Hedgehog  0.0.0
A library to generate hybrid pipeline workflow systems
hh::traits Namespace Reference

Traits used in Hedgehog. More...

Classes

struct  _is_included_
 is_included Default case More...
 
struct  _is_included_< T1, T2, std::integer_sequence< std::size_t, Is... > >
 Check if a tuple of types T1 is included in a tuple of type T2, all type in T1 are in T2. More...
 
struct  Contains
 Check if a template T is in Template pack Ts. More...
 
struct  Contains< T, std::tuple< Ts... > >
 Check if a template T is in tuple containing template pack Ts. More...
 
struct  is_included
 Check if a tuple of types T1 is included in a tuple of type T2, all type in T1 are in T2. More...
 
struct  IsManagedMemory
 Test correctness of type given to a memory manager. More...
 

Functions

template<typename T >
constexpr auto type_name ()
 Create a std::string_view containing a full type name of T. More...
 

Variables

template<typename... >
constexpr auto isUnique = std::true_type{}
 Check if all parameters in a parameters pack are unique, default case. More...
 
template<typename T , typename... Rest>
constexpr auto isUnique< T, Rest... >
 Check if all parameters in a parameters pack are unique, looping through templates. More...
 
template<class PossibleManagedMemory >
constexpr bool is_managed_memory_v = IsManagedMemory<PossibleManagedMemory>::value
 Direct IsManagedMemory value accessor. More...
 
template<class T , class... Ts>
constexpr bool Contains_v = Contains<T, std::tuple<Ts...>>::value
 Direct Contains value accessor. More...
 
template<class T1 , class T2 >
constexpr bool is_included_v = is_included<T1, T2>::value
 Value accessor to test if the types of tuple T1 are in types of tuple T2. More...
 

Detailed Description

Traits used in Hedgehog.

Function Documentation

◆ type_name()

template<typename T >
constexpr auto hh::traits::type_name ( )

Create a std::string_view containing a full type name of T.

Template Parameters
TType to get the name from
Returns
std::string_view containing a full type name of T

Definition at line 127 of file traits.h.

Variable Documentation

◆ Contains_v

template<class T , class... Ts>
constexpr bool hh::traits::Contains_v = Contains<T, std::tuple<Ts...>>::value
inline

Direct Contains value accessor.

Template Parameters
TType to test
TsParameter pack

Definition at line 91 of file traits.h.

◆ is_included_v

template<class T1 , class T2 >
constexpr bool hh::traits::is_included_v = is_included<T1, T2>::value
inline

Value accessor to test if the types of tuple T1 are in types of tuple T2.

Template Parameters
T1Tuple of types that should be in type T2
T2Tuple of types that should contain all type of T1

Definition at line 121 of file traits.h.

◆ is_managed_memory_v

template<class PossibleManagedMemory >
constexpr bool hh::traits::is_managed_memory_v = IsManagedMemory<PossibleManagedMemory>::value
inline

Direct IsManagedMemory value accessor.

Template Parameters
PossibleManagedMemoryType to test to be used in AbstractMemoryManager

Definition at line 70 of file traits.h.

◆ isUnique

template<typename... >
constexpr auto hh::traits::isUnique = std::true_type{}
inline

Check if all parameters in a parameters pack are unique, default case.

Template Parameters
...Default list of templates

Definition at line 47 of file traits.h.

◆ isUnique< T, Rest... >

template<typename T , typename... Rest>
constexpr auto hh::traits::isUnique< T, Rest... >
inline
Initial value:
=
std::bool_constant<(!std::is_same_v<T, Rest> && ...) && isUnique<Rest...>>{}
constexpr auto isUnique
Check if all parameters in a parameters pack are unique, default case.
Definition: traits.h:47

Check if all parameters in a parameters pack are unique, looping through templates.

Template Parameters
TCurrent type to test
RestFollowing type

Definition at line 53 of file traits.h.