LiteFX 0.4.1.2025
Computer Graphics Engine
Loading...
Searching...
No Matches
LiteFX::meta Namespace Reference

Contains type traits and meta-programming features for compile-time evaluation. More...

Classes

struct  has_builder_t
 Trait that is evaluated, if a class does not have an builder member type defined. More...
 
struct  has_builder_t< T, std::void_t< typename T::builder > >
 Trait that is evaluated, if a class does have an builder member type defined. More...
 
struct  is_explicitly_constructible_t
 Evaluates to either true or false, if T can be constructed using the provided arguments, whilst not being able to be converted from TArg . More...
 
struct  is_implicitly_constructible_t
 Evaluates to either true or false, if T can be constructed using the provided arguments and at the same time can also be converted from TArg . More...
 

Concepts

concept  has_builder
 Checks if a type contains a builder.
 
concept  is_explicitly_constructible
 Checks if a type can be constructed using the provided arguments, whilst not being able to be converted from TArg .
 
concept  is_implicitly_constructible
 Checks if a type can be constructed using the provided arguments and at the same time can also be converted from TArg .
 
concept  implements
 Checks if a type TDerived is derived from another type TBase and is non-abstract.
 
concept  are_same
 Checks if a set of types are all equal to the type T .
 

Variables

template<class T >
constexpr bool has_builder_v = has_builder_t<T>::value
 Evaluates to either true or false, if T contains an builder member definition.
 
template<typename T , typename TArg , typename ... TArgs>
constexpr bool is_explicitly_constructible_v = is_explicitly_constructible_t<T, TArg, TArgs...>::value
 Evalues to true or false, depending if T contains an explicit constructor that takes TArg and TArgs as arguments.
 
template<typename T , typename TArg , typename ... TArgs>
constexpr bool is_implicitly_constructible_v = is_explicitly_constructible_t<T, TArg, TArgs...>::value
 Evalues to true or false, depending if T contains an implicit constructor that takes TArg and TArgs as arguments.
 

Detailed Description

Contains type traits and meta-programming features for compile-time evaluation.

Variable Documentation

◆ has_builder_v

template<class T >
bool LiteFX::meta::has_builder_v = has_builder_t<T>::value
constexpr

Evaluates to either true or false, if T contains an builder member definition.

template <typename T, std::enable_if_t<meta::has_builder_v<T>, int> = 0, typename TBuilder = T::builder>
TBuilder makeBuilder() { return TBuilder(); }
template <typename T, typename TBuilder, std::enable_if_t<!meta::has_builder_v<T>, int> = 0, typename TBuilder = Builder<T, TBuilder>>
TBuilder makeBuilder() { return TBuilder(); }
Template Parameters
TThe type to check for an builder.
See also
Builder

◆ is_explicitly_constructible_v

template<typename T , typename TArg , typename ... TArgs>
bool LiteFX::meta::is_explicitly_constructible_v = is_explicitly_constructible_t<T, TArg, TArgs...>::value
constexpr

Evalues to true or false, depending if T contains an explicit constructor that takes TArg and TArgs as arguments.

Template Parameters
TThe type to check.
TArgThe parameter to check for conversion support.
...TArgsThe remaining constructor parameters.

◆ is_implicitly_constructible_v

template<typename T , typename TArg , typename ... TArgs>
bool LiteFX::meta::is_implicitly_constructible_v = is_explicitly_constructible_t<T, TArg, TArgs...>::value
constexpr

Evalues to true or false, depending if T contains an implicit constructor that takes TArg and TArgs as arguments.

Template Parameters
TThe type to check.
TArgThe parameter to check for conversion support.
...TArgsThe remaining constructor parameters.