repr 0.1
Reconstructable string representations and more
Loading...
Searching...
No Matches
librepr::Reflect< T > Struct Template Reference

#include <aggregate.h>

Inheritance diagram for librepr::Reflect< T >:
[legend]
Collaboration diagram for librepr::Reflect< T >:
[legend]

Public Types

using member_tuple = decltype(librepr::detail::to_reftuple(std::declval< T >()))
 
using member_types = typename pack::rebox< member_tuple, TypeList >::template map< std::remove_reference_t >
 
using type = T
 
using members = typename member_types::template map< librepr::Reflect >
 
using type = T
 
using type = T
 
using element_type = typename T::value_type
 
using type = T
 
using first_type = typename T::first_type
 
using second_type = typename T::second_type
 
using members = typename TypeList< first_type, second_type >::template map< librepr::Reflect >
 
using type = T
 
using alternatives = typename detail::VariantDetector< T >::alternatives
 

Static Public Member Functions

template<typename V >
static void visit (V &&visitor, T &obj)
 
template<typename V >
static void visit (V &&visitor)
 
template<typename V >
static void visit (V &&visitor, T &obj)
 
template<typename V >
static void visit (V &&visitor, T &obj)
 
template<typename V >
static void visit (V &&visitor)
 
template<typename V >
static void visit (V &&visitor, T &obj)
 
template<typename V >
static void visit (V &&visitor)
 
template<typename V >
static void visit (V &&visitor, type &obj)
 
template<typename V >
static void visit (V &&visitor)
 
static auto type_name ()
 

Static Public Attributes

static constexpr auto member_count = librepr::detail::arity<T>
 
static constexpr bool can_descend = true
 
static constexpr auto enumerator_names = librepr::enum_names<T>()
 
static constexpr bool iterable = true
 
static constexpr bool associative
 
static constexpr bool tuple_like = true
 

Member Typedef Documentation

◆ alternatives

template<typename T >
using librepr::Reflect< T >::alternatives = typename detail::VariantDetector<T>::alternatives

◆ element_type

template<typename T >
using librepr::Reflect< T >::element_type = typename T::value_type

◆ first_type

template<typename T >
using librepr::Reflect< T >::first_type = typename T::first_type

◆ member_tuple

◆ member_types

◆ members [1/2]

template<typename T >
using librepr::Reflect< T >::members = typename member_types::template map<librepr::Reflect>

◆ members [2/2]

◆ second_type

template<typename T >
using librepr::Reflect< T >::second_type = typename T::second_type

◆ type [1/5]

template<typename T >
using librepr::Reflect< T >::type = T

◆ type [2/5]

template<typename T >
using librepr::Reflect< T >::type = T

◆ type [3/5]

template<typename T >
using librepr::Reflect< T >::type = T

◆ type [4/5]

template<typename T >
using librepr::Reflect< T >::type = T

◆ type [5/5]

template<typename T >
using librepr::Reflect< T >::type = T

Member Function Documentation

◆ type_name()

template<typename T >
static auto librepr::category::Type< T >::type_name ( )
inlinestaticinherited

◆ visit() [1/9]

template<typename T >
template<typename V >
static void librepr::Reflect< T >::visit ( V &&  visitor)
inlinestatic

◆ visit() [2/9]

template<typename T >
template<typename V >
static void librepr::Reflect< T >::visit ( V &&  visitor)
inlinestatic

◆ visit() [3/9]

template<typename T >
template<typename V >
static void librepr::Reflect< T >::visit ( V &&  visitor)
inlinestatic

◆ visit() [4/9]

template<typename T >
template<typename V >
static void librepr::Reflect< T >::visit ( V &&  visitor)
inlinestatic

◆ visit() [5/9]

template<typename T >
template<typename V >
static void librepr::Reflect< T >::visit ( V &&  visitor,
T &  obj 
)
inlinestatic

◆ visit() [6/9]

template<typename T >
template<typename V >
static void librepr::Reflect< T >::visit ( V &&  visitor,
T &  obj 
)
inlinestatic

◆ visit() [7/9]

template<typename T >
template<typename V >
static void librepr::Reflect< T >::visit ( V &&  visitor,
T &  obj 
)
inlinestatic

◆ visit() [8/9]

template<typename T >
template<typename V >
static void librepr::Reflect< T >::visit ( V &&  visitor,
T &  obj 
)
inlinestatic

◆ visit() [9/9]

template<typename T >
template<typename V >
static void librepr::Reflect< T >::visit ( V &&  visitor,
type obj 
)
inlinestatic

Member Data Documentation

◆ associative

template<typename T >
constexpr bool librepr::Reflect< T >::associative
staticconstexpr
Initial value:
= requires {
typename type::key_type;
typename type::mapped_type;
}

◆ can_descend

template<typename T >
static constexpr bool librepr::Reflect< T >::can_descend = true
staticconstexpr

◆ enumerator_names

template<typename T >
constexpr auto librepr::Reflect< T >::enumerator_names = librepr::enum_names<T>()
staticconstexpr

◆ iterable

template<typename T >
static constexpr bool librepr::Reflect< T >::iterable = true
staticconstexpr

◆ member_count

template<typename T >
constexpr auto librepr::Reflect< T >::member_count = librepr::detail::arity<T>
staticconstexpr

◆ tuple_like

template<typename T >
constexpr bool librepr::Reflect< T >::tuple_like = true
staticconstexpr

The documentation for this struct was generated from the following files: