proxsuite 0.6.7
The Advanced Proximal Optimization Toolbox
Loading...
Searching...
No Matches
tl::detail Namespace Reference

\exclude More...

Namespaces

namespace  swap_adl_tests
 

Classes

struct  conjunction
 
struct  conjunction< B >
 
struct  conjunction< B, Bs... >
 
struct  i_am_secret
 
struct  invoke_result_impl
 
struct  invoke_result_impl< F, decltype(detail::invoke(std::declval< F >(), std::declval< Us >()...), void()), Us... >
 
struct  is_nothrow_swappable
 
struct  is_optional_impl
 
struct  is_optional_impl< optional< T > >
 
struct  is_swappable
 
struct  is_swappable< T[N], T[N]>
 
struct  optional_copy_assign_base
 
struct  optional_copy_assign_base< T, false >
 
struct  optional_copy_base
 
struct  optional_copy_base< T, false >
 
struct  optional_delete_assign_base
 
struct  optional_delete_assign_base< T, false, false >
 
struct  optional_delete_assign_base< T, false, true >
 
struct  optional_delete_assign_base< T, true, false >
 
struct  optional_delete_ctor_base
 
struct  optional_delete_ctor_base< T, false, false >
 
struct  optional_delete_ctor_base< T, false, true >
 
struct  optional_delete_ctor_base< T, true, false >
 
struct  optional_move_assign_base
 
struct  optional_move_assign_base< T, false >
 
struct  optional_move_base
 
struct  optional_move_base< T, false >
 
struct  optional_operations_base
 
struct  optional_storage_base
 
struct  optional_storage_base< T, true >
 
struct  returns_void_impl
 
struct  returns_void_impl< F, void_t< invoke_result_t< F, U... > >, U... >
 
struct  voider
 

Typedefs

template<class T >
using remove_const_t = typename std::remove_const<T>::type
 
template<class T >
using remove_reference_t = typename std::remove_reference<T>::type
 
template<class T >
using decay_t = typename std::decay<T>::type
 
template<bool E, class T = void>
using enable_if_t = typename std::enable_if<E, T>::type
 
template<bool B, class T , class F >
using conditional_t = typename std::conditional<B, T, F>::type
 
template<class F , class... Us>
using invoke_result = invoke_result_impl<F, void, Us...>
 
template<class F , class... Us>
using invoke_result_t = typename invoke_result<F, Us...>::type
 
template<class... Ts>
using void_t = typename voider<Ts...>::type
 
template<class T >
using is_optional = is_optional_impl<decay_t<T>>
 
template<class U >
using fixup_void = conditional_t<std::is_void<U>::value, monostate, U>
 
template<class F , class U , class = invoke_result_t<F, U>>
using get_map_return = optional<fixup_void<invoke_result_t<F, U>>>
 
template<class F , class... U>
using returns_void = returns_void_impl<F, void, U...>
 
template<class T , class... U>
using enable_if_ret_void = enable_if_t<returns_void<T&&, U...>::value>
 
template<class T , class... U>
using disable_if_ret_void = enable_if_t<!returns_void<T&&, U...>::value>
 
template<class T , class U >
using enable_forward_value
 
template<class T , class U , class Other >
using enable_from_other
 
template<class T , class U >
using enable_assign_forward
 
template<class T , class U , class Other >
using enable_assign_from_other
 

Functions

template<typename Fn , typename... Args, typename = enable_if_t<std::is_member_pointer<decay_t<Fn>>::value>, int = 0>
constexpr auto invoke (Fn &&f, Args &&... args) noexcept(noexcept(std::mem_fn(f)(std::forward< Args >(args)...))) -> decltype(std::mem_fn(f)(std::forward< Args >(args)...))
 
template<typename Fn , typename... Args, typename = enable_if_t<!std::is_member_pointer<decay_t<Fn>>::value>>
constexpr auto invoke (Fn &&f, Args &&... args) noexcept(noexcept(std::forward< Fn >(f)(std::forward< Args >(args)...))) -> decltype(std::forward< Fn >(f)(std::forward< Args >(args)...))
 
template<class Opt , class F , class Ret = decltype(detail::invoke(std::declval<F>(), *std::declval<Opt>())), detail::enable_if_t<!std::is_void< Ret >::value > * = nullptr>
constexpr auto optional_map_impl (Opt &&opt, F &&f) -> optional< Ret >
 
template<class Opt , class F , class Ret = decltype(detail::invoke(std::declval<F>(), *std::declval<Opt>())), detail::enable_if_t< std::is_void< Ret >::value > * = nullptr>
auto optional_map_impl (Opt &&opt, F &&f) -> optional< monostate >
 

Detailed Description

\exclude

Typedef Documentation

◆ remove_const_t

template<class T >
using tl::detail::remove_const_t = typename std::remove_const<T>::type

Definition at line 135 of file tl-optional.hpp.

◆ remove_reference_t

template<class T >
using tl::detail::remove_reference_t = typename std::remove_reference<T>::type

Definition at line 137 of file tl-optional.hpp.

◆ decay_t

template<class T >
using tl::detail::decay_t = typename std::decay<T>::type

Definition at line 139 of file tl-optional.hpp.

◆ enable_if_t

template<bool E, class T = void>
using tl::detail::enable_if_t = typename std::enable_if<E, T>::type

Definition at line 141 of file tl-optional.hpp.

◆ conditional_t

template<bool B, class T , class F >
using tl::detail::conditional_t = typename std::conditional<B, T, F>::type

Definition at line 143 of file tl-optional.hpp.

◆ invoke_result

template<class F , class... Us>
using tl::detail::invoke_result = invoke_result_impl<F, void, Us...>

Definition at line 248 of file tl-optional.hpp.

◆ invoke_result_t

template<class F , class... Us>
using tl::detail::invoke_result_t = typename invoke_result<F, Us...>::type

Definition at line 251 of file tl-optional.hpp.

◆ void_t

template<class... Ts>
using tl::detail::void_t = typename voider<Ts...>::type

Definition at line 350 of file tl-optional.hpp.

◆ is_optional

template<class T >
using tl::detail::is_optional = is_optional_impl<decay_t<T>>

Definition at line 360 of file tl-optional.hpp.

◆ fixup_void

template<class U >
using tl::detail::fixup_void = conditional_t<std::is_void<U>::value, monostate, U>

Definition at line 364 of file tl-optional.hpp.

◆ get_map_return

template<class F , class U , class = invoke_result_t<F, U>>
using tl::detail::get_map_return = optional<fixup_void<invoke_result_t<F, U>>>

Definition at line 367 of file tl-optional.hpp.

◆ returns_void

template<class F , class... U>
using tl::detail::returns_void = returns_void_impl<F, void, U...>

Definition at line 377 of file tl-optional.hpp.

◆ enable_if_ret_void

template<class T , class... U>
using tl::detail::enable_if_ret_void = enable_if_t<returns_void<T&&, U...>::value>

Definition at line 380 of file tl-optional.hpp.

◆ disable_if_ret_void

template<class T , class... U>
using tl::detail::disable_if_ret_void = enable_if_t<!returns_void<T&&, U...>::value>

Definition at line 383 of file tl-optional.hpp.

◆ enable_forward_value

template<class T , class U >
using tl::detail::enable_forward_value
Initial value:
detail::enable_if_t<std::is_constructible<T, U&&>::value &&
!std::is_same<detail::decay_t<U>, in_place_t>::value &&
!std::is_same<optional<T>, detail::decay_t<U>>::value>

Definition at line 386 of file tl-optional.hpp.

◆ enable_from_other

template<class T , class U , class Other >
using tl::detail::enable_from_other
Initial value:
detail::enable_if_t<std::is_constructible<T, Other>::value &&
!std::is_constructible<T, optional<U>&>::value &&
!std::is_constructible<T, optional<U>&&>::value &&
!std::is_constructible<T, const optional<U>&>::value &&
!std::is_constructible<T, const optional<U>&&>::value &&
!std::is_convertible<optional<U>&, T>::value &&
!std::is_convertible<optional<U>&&, T>::value &&
!std::is_convertible<const optional<U>&, T>::value &&
!std::is_convertible<const optional<U>&&, T>::value>

Definition at line 392 of file tl-optional.hpp.

◆ enable_assign_forward

template<class T , class U >
using tl::detail::enable_assign_forward
Initial value:
detail::enable_if_t<
!std::is_same<optional<T>, detail::decay_t<U>>::value &&
!detail::conjunction<std::is_scalar<T>,
std::is_same<T, detail::decay_t<U>>>::value &&
std::is_constructible<T, U>::value && std::is_assignable<T&, U>::value>

Definition at line 404 of file tl-optional.hpp.

◆ enable_assign_from_other

template<class T , class U , class Other >
using tl::detail::enable_assign_from_other
Initial value:
detail::enable_if_t<std::is_constructible<T, Other>::value &&
std::is_assignable<T&, Other>::value &&
!std::is_constructible<T, optional<U>&>::value &&
!std::is_constructible<T, optional<U>&&>::value &&
!std::is_constructible<T, const optional<U>&>::value &&
!std::is_constructible<T, const optional<U>&&>::value &&
!std::is_convertible<optional<U>&, T>::value &&
!std::is_convertible<optional<U>&&, T>::value &&
!std::is_convertible<const optional<U>&, T>::value &&
!std::is_convertible<const optional<U>&&, T>::value &&
!std::is_assignable<T&, optional<U>&>::value &&
!std::is_assignable<T&, optional<U>&&>::value &&
!std::is_assignable<T&, const optional<U>&>::value &&
!std::is_assignable<T&, const optional<U>&&>::value>

Definition at line 411 of file tl-optional.hpp.

Function Documentation

◆ invoke() [1/2]

template<typename Fn , typename... Args, typename = enable_if_t<std::is_member_pointer<decay_t<Fn>>::value>, int = 0>
constexpr auto tl::detail::invoke ( Fn && f,
Args &&... args ) -> decltype(std::mem_fn(f)(std::forward<Args>(args)...))
constexprnoexcept

Definition at line 215 of file tl-optional.hpp.

◆ invoke() [2/2]

template<typename Fn , typename... Args, typename = enable_if_t<!std::is_member_pointer<decay_t<Fn>>::value>>
constexpr auto tl::detail::invoke ( Fn && f,
Args &&... args ) -> decltype(std::forward<Fn>(f)(std::forward<Args>(args)...))
constexprnoexcept

Definition at line 226 of file tl-optional.hpp.

◆ optional_map_impl() [1/2]

template<class Opt , class F , class Ret = decltype(detail::invoke(std::declval<F>(), *std::declval<Opt>())), detail::enable_if_t<!std::is_void< Ret >::value > * = nullptr>
constexpr auto tl::detail::optional_map_impl ( Opt && opt,
F && f ) -> optional<Ret>
constexpr

Definition at line 1845 of file tl-optional.hpp.

◆ optional_map_impl() [2/2]

template<class Opt , class F , class Ret = decltype(detail::invoke(std::declval<F>(), *std::declval<Opt>())), detail::enable_if_t< std::is_void< Ret >::value > * = nullptr>
auto tl::detail::optional_map_impl ( Opt && opt,
F && f ) -> optional<monostate>

Definition at line 1859 of file tl-optional.hpp.