join 1.0
lightweight network framework library
Loading...
Searching...
No Matches
traits.hpp File Reference
#include <type_traits>
#include <utility>
Include dependency graph for traits.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  join::overload<>
 overload resolution. More...
 
struct  join::overload< First, Ts... >
 overload resolution. More...
 
struct  join::overload< void, Ts... >
 overload resolution. More...
 

Namespaces

namespace  join
 

Typedefs

template<typename T , typename... Ts>
using join::match_t = typename std::invoke_result_t<overload<Ts...>, T>::type
 find a type that match one of the alternatives of a parameter pack.
 

Variables

template<typename T , typename... Ts>
constexpr std::size_t join::find_index_v = 0
 get element position in a parameter pack according its type.
 
template<typename T , typename First , typename... Ts>
constexpr std::size_t join::find_index_v< T, First, Ts... >
 get element position in a parameter pack according its type.
 
template<typename T , typename... Ts>
constexpr std::size_t join::count_v = (std::size_t{0} + ... + std::is_same_v<T, Ts>)
 count the number of time a type appears in a parameter pack.
 
template<typename T , typename... Ts>
constexpr bool join::is_unique_v = count_v<T, Ts...> == 1
 check if a type only appears one time in a parameter pack.