eswitch-v5
Advanced counterpart for switch statement in C++
eswitch_v5::details Namespace Reference

Classes

struct  Always_false
 
struct  amount_args
 
struct  amount_args< T, std::void_t< decltype(&T::operator()) > >
 
struct  amount_args_function_has
 
struct  amount_args_function_has< R(C::*)(Args...) >
 
struct  amount_args_function_has< R(C::*)(Args...) const >
 
struct  invoke_result
 
struct  invoke_result< T, std::void_t< decltype(&T::operator()) > >
 
struct  is_callable_impl
 
struct  is_callable_impl< R(C::*)(Args...) >
 
struct  is_callable_impl< R(C::*)(Args...) const >
 
struct  is_default_case
 
struct  is_default_case< condition< Op, I, extension::any > >
 
struct  is_predicate
 
struct  is_predicate< C< T, Is... > >
 
struct  is_std_pair
 
struct  is_std_pair< Pair< T1, T2 > >
 
struct  is_std_tuple
 
struct  is_std_tuple< Tuple< Ts... > >
 

Typedefs

template<typename T >
using invoke_result_t = typename invoke_result< T >::type
 

Functions

template<std::size_t ... Is, typename Tup >
static constexpr auto create_indexed_condition (Tup &&values)
 
template<typename ... Ts>
constexpr std::true_type is_std_variant (std::variant< Ts... > &&)
 
template<typename T >
constexpr std::false_type is_std_variant (T &&)
 
template<typename ... Cnds>
constexpr auto move_default_case_to_the_end (Cnds &&... cnds)
 
template<typename ... TupleCnds, typename Cnd , typename ... Cnds>
constexpr auto move_default_case_to_the_end_impl (std::tuple< TupleCnds... > &&tup, Cnd &&cnd, Cnds &&...cnds)
 
static constexpr bool unreachable ()
 

Variables

template<typename T >
constexpr std::size_t amount_args_v = amount_args< T >::value
 
template<typename T >
constexpr bool is_callable_v = is_callable_impl< decltype( &T::operator() ) >::value
 
template<typename T >
constexpr bool is_default_case_v = is_default_case< T >::value
 
template<typename T >
constexpr bool is_predicate_v = is_predicate< T >::value
 
template<typename T >
constexpr bool is_std_any_v = std::is_same_v< std::decay_t< T >, std::any >
 
template<typename T >
constexpr bool is_std_pair_v = is_std_pair< std::decay_t< T > >::value
 
template<typename T >
constexpr bool is_std_tuple_v = is_std_tuple< std::decay_t< T > >::value
 
template<typename T >
constexpr bool is_std_variant_v = decltype( is_std_variant( std::declval< std::decay_t< T > >() ) )()