ECSTASY
All in the name
Loading...
Searching...
No Matches
util::meta Namespace Reference

Namespace regrouping all meta programmation helper types. More...

Classes

struct  _filter
 
struct  _filter< Traits< Treated... >, Filter >
 
struct  _filter< Traits< Treated... >, Filter, Current, Untreated... >
 
struct  _left_outer_join
 
struct  _left_outer_join< Traits< Rights... >, IsInner, Left, OuterLefts... >
 
struct  _type_set_eq
 
struct  _type_set_eq< std::tuple< T1, Ts1... >, std::tuple< Ts2... > >
 
struct  _type_set_eq< std::tuple<>, std::tuple<> >
 
struct  add_optional
 Add optional to a type if required. More...
 
struct  add_optional< std::optional< T > >
 Add optional to a type if required. More...
 
struct  add_optional< T & >
 Add optional to a type if required. More...
 
struct  apply
 Apply a modification on all types in Ts. More...
 
struct  apply< Functor, Traits< Ts... > >
 Apply a modification on all types in Ts. More...
 
struct  filter
 Filter the types in Ts keeping only those for which Filter<T>::value was true. More...
 
struct  index
 Get the index of the first occurence of type T in the types Ts. More...
 
struct  index< T, T, Ts... >
 Get the index of the first occurence of type T in the types Ts. More...
 
struct  index< T, U, Ts... >
 Get the index of the first occurence of type T in the types Ts. More...
 
struct  is_std_vector
 Check if a type is a std::vector. More...
 
struct  is_std_vector< std::vector< T, A > >
 Check if a type is a std::vector. More...
 
struct  is_type_bounded_array
 Check if a type is a bounded array of a given element type. More...
 
struct  is_type_bounded_array< T, U >
 Check if a type is a bounded array of a given element type. More...
 
struct  left_outer_join
 Performs a left outer join on two parameter pack types (returns types in Lefts but no in Rights). More...
 
struct  left_outer_join< std::tuple< Lefts... >, std::tuple< Rights... > >
 Performs a left outer join on two parameter pack types wrapped in tuple types (return types in lefts but not in Rights). More...
 
struct  left_outer_join< Traits< Left, Lefts... >, Traits< Rights... > >
 Performs a left outer join on two parameter pack types wrapped in Traits types (returns types in Lefts but not in Rights). More...
 
struct  Traits
 Empty parameter pack helper type. More...
 
struct  Traits< Arg, Args... >
 Parameter pack helper type. More...
 
struct  type_set_eq
 Test if two tuple types contains the exact same type independently of the order. More...
 
struct  type_set_eq< std::tuple< Ts1... >, std::tuple< Ts2... > >
 

Concepts

concept  is_size_t_convertible
 Check if a type is std::size_t or is convertible to it.
 

Typedefs

template<typename T >
using add_optional_t = typename add_optional< T >::type
 Helper to add_optional<T>::type.
 
template<template< typename > typename Functor, typename... Ts>
using apply_t = typename apply< Functor, Ts... >::type
 Helper for apply<...>::type.
 
template<template< typename > typename Filter, typename... Ts>
using filter_t = typename filter< Filter, Ts... >::type
 Helper for filter<...>::type.
 
template<typename T >
using is_std_vector_v = typename is_std_vector< T >::value
 Helper for is_std_vector<...>::value.
 
template<typename Lefts , typename Rights >
using left_outer_join_t = typename left_outer_join< Lefts, Rights >::type
 Helper for left_outer_join<...>::type.
 
template<typename Lefts , typename Rights >
using right_outer_join = left_outer_join< Rights, Lefts >
 Performs a right outer join on two parameter pack types wrapped in tuple types (return types in rights but not in lefts).
 
template<typename Lefts , typename Rights >
using right_outer_join_t = typename right_outer_join< Lefts, Rights >::type
 Helper for right_outer_join<...>::type.
 

Variables

template<typename T , typename... Ts>
constexpr bool contains = std::disjunction_v<std::is_same<T, Ts>...>
 Checks if the type T exists in the types Ts.
 
template<typename T , typename... Ts>
constexpr std::size_t index_v = index<T, Ts...>::value
 Helper for index<...>::type.
 
template<typename T , typename U >
constexpr bool is_type_bounded_array_v = is_type_bounded_array<T, U>::value
 Helper for is_type_bounded_array<...>::value.
 
template<typename Ts1 , typename Ts2 >
bool constexpr type_set_eq_v = type_set_eq<Ts1, Ts2>::value
 Helper for type_set_eq.
 

Detailed Description

Namespace regrouping all meta programmation helper types.

Author
Andréas Leroux (andre.nosp@m.as.l.nosp@m.eroux.nosp@m.@epi.nosp@m.tech..nosp@m.eu)
Since
1.0.0 (2022-11-18)

Typedef Documentation

◆ add_optional_t

template<typename T >
using util::meta::add_optional_t = typedef typename add_optional<T>::type

Helper to add_optional<T>::type.

Template Parameters
TEvaluated type.
Author
Andréas Leroux (andre.nosp@m.as.l.nosp@m.eroux.nosp@m.@epi.nosp@m.tech..nosp@m.eu)
Since
1.0.0 (2022-10-27)

Definition at line 56 of file add_optional.hpp.

◆ apply_t

template<template< typename > typename Functor, typename... Ts>
using util::meta::apply_t = typedef typename apply<Functor, Ts...>::type

Helper for apply<...>::type.

Template Parameters
Functorfunctor.
TsTypes to modify.
Author
Andréas Leroux (andre.nosp@m.as.l.nosp@m.eroux.nosp@m.@epi.nosp@m.tech..nosp@m.eu)
Since
1.0.0 (2022-10-29)

Definition at line 53 of file apply.hpp.

◆ filter_t

template<template< typename > typename Filter, typename... Ts>
using util::meta::filter_t = typedef typename filter<Filter, Ts...>::type

Helper for filter<...>::type.

Template Parameters
Filterfilter.
TsTypes to filter.
Author
Andréas Leroux (andre.nosp@m.as.l.nosp@m.eroux.nosp@m.@epi.nosp@m.tech..nosp@m.eu)
Since
1.0.0 (2022-10-29)

Definition at line 82 of file filter.hpp.

◆ is_std_vector_v

template<typename T >
using util::meta::is_std_vector_v = typedef typename is_std_vector<T>::value

Helper for is_std_vector<...>::value.

Template Parameters
TType to check.
Author
Andréas Leroux (andre.nosp@m.as.l.nosp@m.eroux.nosp@m.@epi.nosp@m.tech..nosp@m.eu)
Since
1.0.0 (2024-04-30)

Definition at line 44 of file is_std_vector.hpp.

◆ left_outer_join_t

template<typename Lefts , typename Rights >
using util::meta::left_outer_join_t = typedef typename left_outer_join<Lefts, Rights>::type

Helper for left_outer_join<...>::type.

Template Parameters
LeftsTraits or std::tuple containing the left types.
RightsTraits or std::tuple containing the right types.
Author
Andréas Leroux (andre.nosp@m.as.l.nosp@m.eroux.nosp@m.@epi.nosp@m.tech..nosp@m.eu)
Since
1.0.0 (2022-10-29)

Definition at line 165 of file outer_join.hpp.

◆ right_outer_join

template<typename Lefts , typename Rights >
using util::meta::right_outer_join = typedef left_outer_join<Rights, Lefts>

Performs a right outer join on two parameter pack types wrapped in tuple types (return types in rights but not in lefts).

Template Parameters
LeftsLeft types.
RightsRight types.
Author
Andréas Leroux (andre.nosp@m.as.l.nosp@m.eroux.nosp@m.@epi.nosp@m.tech..nosp@m.eu)
Since
1.0.0 (2022-10-29)

Definition at line 178 of file outer_join.hpp.

◆ right_outer_join_t

template<typename Lefts , typename Rights >
using util::meta::right_outer_join_t = typedef typename right_outer_join<Lefts, Rights>::type

Helper for right_outer_join<...>::type.

Template Parameters
LeftsTraits or std::tuple containing the left types.
RightsTraits or std::tuple containing the right types.
Author
Andréas Leroux (andre.nosp@m.as.l.nosp@m.eroux.nosp@m.@epi.nosp@m.tech..nosp@m.eu)
Since
1.0.0 (2022-10-29)

Definition at line 190 of file outer_join.hpp.

Variable Documentation

◆ contains

template<typename T , typename... Ts>
constexpr bool util::meta::contains = std::disjunction_v<std::is_same<T, Ts>...>
inlineconstexpr

Checks if the type T exists in the types Ts.

Template Parameters
TSearched type.
TsValid types.
Author
Andréas Leroux (andre.nosp@m.as.l.nosp@m.eroux.nosp@m.@epi.nosp@m.tech..nosp@m.eu)
Since
1.0.0 (2022-10-25)

Definition at line 29 of file contains.hpp.

◆ index_v

template<typename T , typename... Ts>
constexpr std::size_t util::meta::index_v = index<T, Ts...>::value
inlineconstexpr

Helper for index<...>::type.

Template Parameters
TSearched type.
TsTypes containing T.
Author
Andréas Leroux (andre.nosp@m.as.l.nosp@m.eroux.nosp@m.@epi.nosp@m.tech..nosp@m.eu)
Since
1.0.0 (2022-10-29)

Definition at line 51 of file index.hpp.

◆ is_type_bounded_array_v

template<typename T , typename U >
constexpr bool util::meta::is_type_bounded_array_v = is_type_bounded_array<T, U>::value
inlineconstexpr

Helper for is_type_bounded_array<...>::value.

Template Parameters
TType to check.
UExpected type of the array elements.
Author
Andréas Leroux (andre.nosp@m.as.l.nosp@m.eroux.nosp@m.@epi.nosp@m.tech..nosp@m.eu)
Since
1.0.0 (2024-10-10)

Definition at line 47 of file is_type_bounded_array.hpp.

◆ type_set_eq_v

template<typename Ts1 , typename Ts2 >
bool constexpr util::meta::type_set_eq_v = type_set_eq<Ts1, Ts2>::value
inlineconstexpr

Helper for type_set_eq.

Template Parameters
Ts1First type evaluated.
Ts2Second type evaluated.
Author
Andréas Leroux (andre.nosp@m.as.l.nosp@m.eroux.nosp@m.@epi.nosp@m.tech..nosp@m.eu)
Since
1.0.0 (2022-10-28)

Definition at line 120 of file type_set_eq.hpp.