smgl 0.11.0
Structured Metadata Engine and Graph Objects Library
Loading...
Searching...
No Matches
Classes | Typedefs | Variables
smgl::type_traits Namespace Reference

Custom type traits namespace. More...

Classes

struct  bool_pack
 
struct  is_ptr_to_base
 Checks if Ptr element type can be converted to Base. More...
 
struct  is_ptr_to_base_helper
 
struct  remove_cvref
 Removes const-qualifications and references from type. More...
 

Typedefs

template<typename T >
using remove_cvref_t = typename remove_cvref< T >::type
 Removes const-qualifications and references from type.
 
template<bool... v>
using all_true = std::is_same< bool_pack< true, v... >, bool_pack< v..., true > >
 Checks if all template conditions are true.
 

Variables

template<bool... v>
constexpr bool all_true_v = all_true<v...>::value
 Checks if all template conditions are true.
 
template<typename Ptr , typename Base >
constexpr bool is_ptr_to_base_v = is_ptr_to_base<Ptr, Base>::value
 Checks if Ptr element type can be converted to Base.
 

Detailed Description

Custom type traits namespace.

Augments the type_traits found in <type_traits>

Typedef Documentation

◆ all_true

template<bool... v>
using smgl::type_traits::all_true = typedef std::is_same<bool_pack<true, v...>, bool_pack<v..., true> >

Checks if all template conditions are true.

See: https://stackoverflow.com/a/28253503

Definition at line 41 of file TypeTraits.hpp.

◆ remove_cvref_t

template<typename T >
using smgl::type_traits::remove_cvref_t = typedef typename remove_cvref<T>::type

Removes const-qualifications and references from type.

Implementation of std::remove_cvref which is not available until C++20.

Definition at line 26 of file TypeTraits.hpp.

Variable Documentation

◆ all_true_v

template<bool... v>
constexpr bool smgl::type_traits::all_true_v = all_true<v...>::value
constexpr

Checks if all template conditions are true.

See: https://stackoverflow.com/a/28253503

Definition at line 45 of file TypeTraits.hpp.

◆ is_ptr_to_base_v

template<typename Ptr , typename Base >
constexpr bool smgl::type_traits::is_ptr_to_base_v = is_ptr_to_base<Ptr, Base>::value
constexpr

Checks if Ptr element type can be converted to Base.

Definition at line 69 of file TypeTraits.hpp.