LArSoft
v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
|
Traits to change types. More...
Classes | |
struct | util::with_const_as< Base, Key > |
Trait with type Base , plus the constantness as in Key . More... | |
struct | util::strip_referenceness_type< T > |
Trait with type T stripped of all known reference types. More... | |
struct | util::reference_addresser |
Functor applying the proper referenced_address() function. More... | |
struct | util::lvalue_reference_into_wrapper_type< T > |
Trait with type T into std::reference_wrapper if reference. More... | |
Typedefs | |
template<typename Base , typename Key > | |
using | util::with_const_as_t = typename with_const_as< Base, Key >::type |
The type Base , plus the constantness as in Key . More... | |
template<typename T > | |
using | util::strip_referenceness_t = typename strip_referenceness_type< T >::type |
The type T stripped of all known reference types. More... | |
template<typename T > | |
using | util::lvalue_reference_into_wrapper_t = typename lvalue_reference_into_wrapper_type< T >::type |
The type T stripped of all known reference types. More... | |
Functions | |
template<typename Ref > | |
auto | util::referenced_address (Ref &&ref) |
Returns the address of the referenced object. More... | |
template<typename T > | |
auto | util::lvalue_reference_into_wrapper (T &&obj) |
Converts a l-value reference object into a std::reference_wrapper . More... | |
Traits to change types.
using util::lvalue_reference_into_wrapper_t = typedef typename lvalue_reference_into_wrapper_type<T>::type |
The type T
stripped of all known reference types.
T | type to remove referenceness from |
Definition at line 610 of file MetaUtils.h.
using util::strip_referenceness_t = typedef typename strip_referenceness_type<T>::type |
The type T
stripped of all known reference types.
T | type to remove referenceness from |
util::strip_referenceness_type
Definition at line 539 of file MetaUtils.h.
using util::with_const_as_t = typedef typename with_const_as<Base, Key>::type |
The type Base
, plus the constantness as in Key
.
Base | the basic type being returned |
Key | a type expressing the constantness wanted for Base |
util::with_const_as
Definition at line 515 of file MetaUtils.h.
auto util::lvalue_reference_into_wrapper | ( | T && | obj | ) |
Converts a l-value reference object into a std::reference_wrapper
.
T | type of the object to be converted |
obj | object to be converted |
obj
or a std::reference_wrapper
around it This function operates on a fashion similar to util::lvalue_reference_into_wrapper_type
, but it performs the conversion of an instantiated object rather than just reporting a type.
Definition at line 624 of file MetaUtils.h.
auto util::referenced_address | ( | Ref && | ref | ) |
Returns the address of the referenced object.
Ref | type of reference |
ref | reference |
This function also manages std::reference_wrapper
arguments, by returning the address of the object they reference. In all other cases, the return value is simply std::addressof(obj)
.
Definition at line 913 of file MetaUtils.h.
Referenced by util::reference_addresser::addressof().