Lumiera 0.pre.04
»edit your freedom«
Loading...
Searching...
No Matches
lib::meta Namespace Reference

Namespaces

namespace  anonymous_namespace{function.hpp}
 
namespace  anonymous_namespace{tuple-closure.hpp}
 
namespace  anonymous_namespace{tuple-helper.hpp}
 
namespace  anonymous_namespace{util.hpp}
 
namespace  anonymous_namespace{value-type-binding.hpp}
 
namespace  anonymous_namespace{variadic-helper.hpp}
 
namespace  anonymous_namespace{virtual -copy-support.hpp}
 
namespace  anonymous_namespace{virtual-copy-support.hpp}
 
namespace  func
 
namespace  test
 

Concepts

concept  tuple_sized
 
concept  tuple_adl_accessible
 
concept  tuple_mem_accessible
 
concept  tuple_element_accessible
 
concept  tuple_accessible
 
concept  tuple_like
 Concept to mark any type compliant to the »tuple protocol«
 

Typedefs

typedef size_t HasUsableHashDefinition
 
typedef function< void(void)> FunVoid
 
typedef lib::InPlaceAnyHolder< sizeof(FunVoid), lib::InPlaceAnyHolder_unrelatedTypesFunHolder
 
typedef lib::InPlaceAnyHolder< sizeof(void *), lib::InPlaceAnyHolder_unrelatedTypesFunPtrHolder
 
template<typename FUN >
using _FunRet = _Fun< FUN >::Ret
 abbreviation for referring to a function's return type
 
template<typename FUN >
using _FunArg = _DetectSingleArgFunction< FUN >::Arg
 abbreviation for referring to a function's single Argument type
 
template<typename FUN , uint a>
using has_Arity = std::bool_constant< _Fun< FUN >::ARITY==a >
 
template<typename FUN >
using is_NullaryFun = has_Arity< FUN, 0 >
 
template<typename FUN >
using is_UnaryFun = has_Arity< FUN, 1 >
 
template<typename FUN >
using is_BinaryFun = has_Arity< FUN, 2 >
 
template<typename FUN >
using is_TernaryFun = has_Arity< FUN, 3 >
 
template<typename TYPES >
using Tuple = BuildTupleType< TYPES >::Type
 Build a std::tuple from types given as type sequence.
 
template<class SRC , class TAR , size_t i>
using ExtractArg = ElementExtractor< SRC, TAR >::template Access< i >
 
template<class LI , uint l>
using Prefix = Splice< LI, Nil, l >::Front
 extract prefix of given length
 
template<class LI , uint p>
using Suffix = Splice< LI, Nil, p >::Back
 extract suffix starting at given pos
 
using NilNode = Node< Nil, Nil >
 
template<size_t siz>
using SizConst = std::integral_constant< size_t, siz >
 
template<class Cond , class T = void>
using enable_if = enable_if_c< Cond::value, T >::type
 SFINAE helper to control the visibility of specialisations and overloads.
 
template<class Cond , class T = void>
using disable_if = enable_if_c< not Cond::value, T >::type
 
typedef char Yes_t
 helper types to detect the overload resolution chosen by the compiler
 
template<typename... XS>
using extractFirst_t = _ExtractFirst< XS... >::Type
 helper to extract the first argument from a variadic arg pack, if any
 
template<class SELF , typename ... ARGS>
using disable_if_self = disable_if< std::is_same< std::remove_cv_t< std::remove_reference_t< extractFirst_t< ARGS... > > >, SELF > >
 helper to prevent a template constructor from shadowing inherited copy ctors
 
template<typename X >
using enable_CustomStringConversion = enable_if< can_convertToString< X > >
 toggle for explicit specialisations
 

Classes

struct  _Fun
 Trait template for uniform access to function signature types. More...
 
struct  _Fun< FUN(C::*)>
 allow also to probe plain member fields, which may hold a functor More...
 
struct  _Fun< FUN, enable_if< has_FunctionOperator< FUN > > >
 Specialisation for function objects and lambdas. More...
 
struct  _Fun< RET(ARGS...) noexcept >
 Specialisation to strip noexcept from the signature. More...
 
struct  _Fun< RET(ARGS...)>
 Specialisation for a bare function signature. More...
 
struct  _Fun< RET(C::*)(ARGS...) const >
 Specialisation to handle member pointer to const function; indirectly this specialisation also handles lambdas, as redirected by the main template (via decltype) More...
 
struct  _Fun< RET(C::*)(ARGS...) noexcept >
 Specialisation to deal with member pointer to noexcept function. More...
 
struct  _Fun< RET(C::*)(ARGS...)>
 Specialisation to deal with member pointer to function. More...
 
struct  _Fun< SIG & >
 Specialisation when using a function reference. More...
 
struct  _Fun< SIG && >
 Specialisation for passing a rvalue reference. More...
 
struct  _Fun< SIG * >
 Specialisation for using a function pointer. More...
 
struct  _Fun< SIG const & >
 Specialisation to strip spurious const for type analysis. More...
 
struct  _Vari
 Metaprogramming helper to remould the type sequence in the template arguments of a variadic template. More...
 
struct  _Vari< L, X >
 
struct  _Vari< L, X, L< XS... > >
 
struct  _Vari< L, X, XS... >
 
struct  _Vari< L, X1, X2 >
 
struct  AllSame
 Metafunction to detect if a type-sequence holds uniform types. More...
 
struct  AllSame< T1, T2, TS... >
 
struct  Append
 append (concatenate) lists-of-types More...
 
struct  Append< Nil, Nil >
 
struct  Append< Nil, Node< TY, TYPES > >
 
struct  Append< Nil, TY2 >
 
struct  Append< Node< TY, TYPES >, Nil >
 
struct  Append< Node< TY, TYPES >, TAIL >
 
struct  Append< TY1, Nil >
 
struct  Apply
 apply a transformation (template) to each type in the list More...
 
struct  Apply< Node< TY, TYPES >, _TRANS_ >
 
struct  ArrayAdapt
 Metaprogramming adapter to overlay a tuple-like signature on top of std::array, with N times the same type. More...
 
struct  ArrayAdapt< T, TT... >
 
struct  BuildFunType
 Build function types from given Argument types. More...
 
struct  BuildFunType< RET, Types< ARGS... > >
 
struct  BuildIdxIter
 build a sequence of index numbers based on a type sequence More...
 
struct  BuildIdxIter< Types< TYPES... > >
 build an index number sequence from a type sequence More...
 
struct  BuildIndexSeq
 build regular sequences of index number e.g. More...
 
struct  BuildIndexSeq< 0 >
 
class  BuildTupleAccessor
 Decorating a tuple type with auxiliary data access operations. More...
 
class  BuildTupleAccessor< _X_, Types<>, TUP, i >
 
struct  can_convertToString
 detect possibility of a conversion to string. More...
 
class  can_IterForEach
 Trait template to detect a type usable immediately as "Lumiera Forward Iterator" in a specialised for-each loop This is just a heuristic, based on some common properties of such iterators; it is enough to distinguish it from an STL container, but can certainly be refined. More...
 
struct  can_lexical2string
 types able to be lexically converted to string representation More...
 
struct  can_StandIn
 verify the first (special) type can stand-in for the second More...
 
class  can_STL_backIteration
 Trait template to detect a type also supporting STL-style backwards iteration. More...
 
class  can_STL_ForEach
 Trait template to detect a type usable with the STL for-each loop. More...
 
struct  can_STL_ForEach< std::unordered_map< KEY, VAL, HASH > >
 the std hashtable(s) are notoriously difficult to handle when it comes to detecting capabilities by metaprogramming, because the're built up from a generic baseclass and especially inherit their iterator-types as template specialisations. More...
 
struct  CartesianProduct
 
class  CloneSupport
 
struct  Combine
 Build all possible combinations, based on a enumeration of the basic cases. More...
 
struct  Combine< Nil, _ENUM_ >
 
struct  Combine< Node< TY, TYPES >, _ENUM_ >
 
struct  CombineFlags
 generate all possible on-off combinations of the given flags. More...
 
struct  CommonResultYield
 Decision helper to select between returning results by value or reference. More...
 
struct  CommonResultYield< T1, T2, true >
 
struct  Comparator
 Trait template for invoking equality comparison. More...
 
struct  CondNode
 conditional node: skip an element based on evaluating a predicate More...
 
struct  CondNode< true, T, TAIL >
 
struct  Config
 
struct  ConstAll
 Build a list of const types from a given typelist. More...
 
struct  ConstAll< Nil >
 
struct  ConstAll< Node< TY, TYPES > >
 
struct  CopySupport
 Policy to pick a suitable implementation of "virtual copy operations". More...
 
struct  CopySupport< X, enable_if< supports_cloning< X > > >
 
struct  CopySupport< X, enable_if< supports_copy_and_assignment< X > > >
 
struct  CopySupport< X, enable_if< supports_only_move< X > > >
 
struct  count
 Metafunction counting the number of Types in the collection. More...
 
struct  count< Nil >
 
struct  count< Node< TY, TYPES > >
 
struct  count< Types< TYPES... > >
 
struct  CountDown
 helper for generating test lists More...
 
struct  CountDown< Num< 0 > >
 
struct  CountDown< Num< I > >
 
struct  Dissect
 Allows to access various parts of a given typelist: Start and End, Prefix and Tail... More...
 
struct  Dissect< Nil >
 
struct  Dissect< Node< T, TYPES > >
 
struct  Distribute
 build a list-of lists, where each element of the first arg list gets in turn prepended to all elements of the second arg list. More...
 
struct  Distribute< Nil, TY >
 
struct  Distribute< Node< TY, TYPES >, TAIL >
 
struct  ElementExtractor
 Generic converter to somehow extract values from the "source" type to fill and initialise a tuple of given target type. More...
 
struct  ElmTypes
 Variadic type sequence builder. More...
 
struct  ElmTypes< TUP >
 Specialisation of variadic access for any tuple-like. More...
 
struct  ElmTypes< Types< TYPES... > >
 Partial specialisation to handle type sequences. More...
 
struct  EmptyBase
 
struct  enable_if_c
 
struct  enable_if_c< false, T >
 
struct  Filter
 filter away those types which don't fulfil a predicate metafunction More...
 
struct  Filter< Nil, _P_ >
 
struct  Filter< Node< TY, TYPES >, _P_ >
 
struct  Flag
 
struct  FlagOnOff
 enumeration generator for the Combine metafunction, yielding an "on" and "off" case; the latter is represented by a list with a Nil-Entry More...
 
class  FullCopySupport
 
struct  FunErasure
 Generic wrapper carrying a function object while hiding the actual function signature. More...
 
class  has_FunctionOperator
 Trait template to detect presence of a simple function call operator. More...
 
struct  has_Sig
 Meta-function to check that some function like entity offers the expected signature. More...
 
struct  has_Sig< FUN, X, false >
 catch-all to prevent compilation failure for anything not function-like. More...
 
struct  has_TypeResult
 helper to check if another metafunction produced a result type More...
 
struct  IndexSeq
 Hold a sequence of index numbers as template parameters. More...
 
struct  InheritFrom
 Helper to just inherit from the given type(s) More...
 
struct  InstancePlaceholder
 Placeholder marker for a special argument position to be supplied later. More...
 
class  InstantiateChained
 Build a single inheritance chain of template instantiations. More...
 
class  InstantiateChained< Nil, _X_, BASE >
 
class  InstantiateChained< Node< TY, TYPES >, _X_, BASE >
 
struct  InstantiateChainedCombinations
 Build a Case matrix. More...
 
class  InstantiateForEach
 Apply a template to a collection of types. More...
 
class  InstantiateForEach< Nil, _X_, BASE >
 
class  InstantiateForEach< Node< TY, TYPES >, _X_, BASE >
 
class  InstantiateWithIndex
 A Variation of InstantiateChained providing an incremented Index value template parameter. More...
 
class  InstantiateWithIndex< Nil, _X_, BASE, i >
 
class  InstantiateWithIndex< Node< TY, TYPES >, _X_, BASE, i >
 
struct  is_basically
 compare for unadorned base type, disregarding const and references More...
 
struct  is_basicallySame
 compare unadorned types, disregarding const and references More...
 
struct  is_narrowingInit
 temporary workaround for GCC Bug-63723, necessary until CGG-5 More...
 
struct  is_narrowingInit< lib::hash::LuidH, TAR >
 
struct  is_nonFloat
 
struct  is_smart_ptr
 detect smart pointers More...
 
struct  is_smart_ptr< std::shared_ptr< T > >
 
struct  is_smart_ptr< std::unique_ptr< T, D > >
 
class  is_StateCore
 Trait template to detect a type exposing a »state core« API. More...
 
struct  is_StreamSource
 
struct  is_StringLike
 detect various flavours of string / text data More...
 
struct  is_Subclass
 verify compliance to an interface by subtype check More...
 
struct  is_Tuple
 trait to detect tuple types More...
 
struct  is_Tuple< const std::tuple< TYPES... > >
 
struct  is_Tuple< std::tuple< TYPES... > >
 
class  is_Typelist
 Trait template for detecting a typelist type. More...
 
struct  isInList
 Metafunction to check if a specific type is contained in a given typelist. More...
 
struct  isInList< TY, Node< TY, TYPES > >
 
struct  isInList< TY, Node< XX, TYPES > >
 
struct  Marked
 Metaprogramming helper to mark some arbitrary base type by subclassing. More...
 
struct  maxAlign
 Metafunction " max( alignof(T) ) for T in TYPES ". More...
 
struct  maxAlign< Nil >
 
struct  maxAlign< Node< TY, TYPES > >
 
struct  maxSize
 Metafunction " max( sizeof(T) ) for T in TYPES ". More...
 
struct  maxSize< Nil >
 
struct  maxSize< Node< TY, TYPES > >
 
class  MoveSupport
 
struct  Nil
 »Empty« mark More...
 
struct  No_t
 
class  NoCopyMoveSupport
 
struct  Node
 Type list with head and tail; T ≡ Nil marks list end. More...
 
struct  NoInstance
 An Entity never to be instantiated. More...
 
struct  NoUsableHashDefinition
 
struct  Num
 constant-wrapper type for debugging purposes, usable for generating lists of distinguishable types More...
 
struct  Numz
 dummy interface / baseclass for diagnostics More...
 
struct  Pick
 pick the n-th element from a typelist More...
 
struct  Pick< Node< TY, TYPES >, 0 >
 
struct  Pick< Node< TY, TYPES >, i >
 
struct  Pick< Types< TYPES... >, i >
 specialisation: pick n-th element from a type sequence More...
 
struct  PickLast
 access the last list element More...
 
struct  PickLast< Nil >
 
struct  PickLast< Node< TY, Nil > >
 
struct  PickLast< Node< TY, TYPES > >
 
struct  PickParametersFromSublist
 
struct  PrefixAll
 prefix each of the elements, yielding a list-of lists-of-types More...
 
struct  PrefixAll< T, Nil >
 
struct  PrefixAll< T, NilNode >
 
struct  PrefixAll< T, Node< TY, TYPES > >
 
struct  Prepend
 Helper: prepend a type to an existing type sequence, thus shifting all elements within the sequence to the right, eventually dropping the last element. More...
 
struct  Prepend< T, Types< TYPES... > >
 
class  provides_BoostHashFunction
 trait template to detect if some custom type TY provides a boost compliant hash function through ADL More...
 
struct  RebindTupleTypes
 match and rebind the type sequence from a tuple More...
 
struct  RebindTupleTypes< std::tuple< TYPES... > >
 
struct  RebindVariadic
 Metaprogramming helper to transfer variadic arguments. More...
 
struct  RebindVariadic< X, U< ARGS... > >
 
struct  RefTraits
 Type definition helper for pointer and reference types. More...
 
struct  RefTraits< TY & >
 
struct  RefTraits< TY && >
 
struct  RefTraits< TY * >
 
struct  Repeat
 Generate a type-sequence filled with N times the same type T. More...
 
struct  Repeat< T, 0 >
 
class  Shifted
 Helper: generate a type sequence left shifted by i steps, filling in Nil at the end. More...
 
struct  Shifted< TYPES, 0 >
 
class  SizeTrait
 A collection of constants to describe the expected size of some known classes, without needing to include the respective headers. More...
 
struct  Splice
 splice some typelist like an overlay into a base typelist, starting at given index. More...
 
struct  Splice< Nil, XX, i >
 
struct  Splice< Node< B, BS >, Nil, 0 >
 
struct  Splice< Node< B, BS >, Node< O, OS >, 0 >
 
struct  Splice< Node< B, BS >, OVERLAY, i >
 
struct  Split
 Helper: separate parts of a type sequence. More...
 
struct  Split< Types< T1, TS... > >
 
struct  Split< Types<> >
 
class  StoreFunction
 Policy for FunErasure: store an embedded std::function Using this policy allows to store arbitrary complex functor objects embedded within a neutral container and retrieving them later type-safe. More...
 
class  StoreFunPtr
 Policy for FunErasure: store a bare function pointer. More...
 
class  StoreUncheckedFunPtr
 Policy for FunErasure: store an unchecked bare function pointer. More...
 
struct  Strip
 Helper for type analysis: tries to strip all kinds of type adornments. More...
 
struct  Tagged
 
struct  TupleClosureBuilder
 Metaprogramming helper to build a constructor-function for »tuple-like« records, where some of the initialisation values are immediately closed (≙ fixed), while the remaining ones are supplied as function arguments. More...
 
struct  TupleClosureBuilder< std::array< T, N > >
 partial specialisation to handle a std::array. More...
 
struct  TupleClosureBuilder< TUP< PARS... > >
 
struct  TupleConstructor
 Extensible Adapter to construct a distinct tuple from some arbitrary source type. More...
 
struct  TupleElementDisplayer
 Helper to dump tuple contents. More...
 
struct  TupleElementDisplayer< Nil, TUP, TUP, n >
 
struct  Types
 variadic sequence of types More...
 
struct  Types< Nil >
 
struct  Types< NilNode >
 
struct  Types< Node< H, T > >
 Additional specialisation of the basic type sequence type, allowing to re-create a (flat) type sequence from a typelist. More...
 
struct  Types< T, TS... >
 
struct  Types<>
 
struct  Unwrap
 Helper for type analysis and convenience accessors: attempts to extract a base type from various wrappers. More...
 
struct  Unwrap< boost::reference_wrapper< X > >
 
struct  Unwrap< P< X, B > >
 
struct  Unwrap< std::reference_wrapper< X > >
 
struct  Unwrap< std::shared_ptr< X > >
 
struct  Unwrap< std::unique_ptr< X, D > >
 
struct  Unwrap< void >
 < More...
 
struct  Unwrap< X * >
 
struct  use_LexicalConversion
 
struct  use_StringConversion4Stream
 when to use custom string conversions for output streams More...
 
struct  ValueTypeBinding
 Type re-binding helper template for creating nested typedefs usable by custom containers and iterator adapters or similar. More...
 
struct  ValueTypeBinding< TY, enable_if< use_ValueTypebindings< TY > > >
 specialisation for classes providing STL style type binding definitions More...
 
struct  ValueTypeBinding< vector< Scope >::const_reverse_iterator >
 this explicit specialisation allows to build a RangeIter to yield const Scope elements, based on the const_reverse_iterator used internally within ScopePath. More...
 
class  VirtualCopySupportInterface
 
class  WithIdxSeq
 helper to invoke a functor, passing instances of std::integral_constant More...
 

Functions

string demangleCxx (Literal rawName)
 Fallback type-ID:
 
string humanReadableTypeID (lib::Literal)
 pretty-print an internal C++ type representation
 
string primaryTypeComponent (lib::Literal)
 extract core name component from a raw type spec
 
string sanitisedFullTypeName (lib::Literal)
 build a sanitised ID from full type name
 
string sanitisedSymbol (std::string const &)
 condense a string and retain only valid identifiers
 
template<typename SIG , typename FUN >
constexpr auto isFunMember (FUN)
 Helper to pick up a member field for verification.
 
template<class W , class TUP >
constexpr auto lateBindInstance (W &instance, TUP &&invocation)
 Fix-up the arguments for a member-function invocation, allowing to inject the actual this instance into an existing argument sequence.
 
template<typename X >
bool equals_safeInvoke (X const &x1, X const &x2)
 
template<typename X >
Unwrap< X >::Typeunwrap (X const &wrapped)
 convenience shortcut: unwrapping free function.
 
template<typename... TTT>
 ArrayAdapt (TTT...) -> ArrayAdapt< std::decay_t< TTT >... >
 
template<std::size_t idx, class TUP >
requires (tuple_like<std::remove_reference_t<TUP>>)
decltype(autogetElm (TUP &&tup)
 Helper for abstracted / unified access to member elements of any tuple-like
 
template<class FUN , class TUP >
requires (tuple_like<remove_reference_t<TUP>>)
constexpr decltype(autoapply (FUN &&f, TUP &&tup) noexcept(can_nothrow_invoke_tup< FUN, TUP >)
 Replacement for std::apply — yet applicable to tuple-like custom types.
 
template<class TUP , class FUN >
requires (tuple_like<remove_reference_t<TUP>>)
constexpr void forEach (TUP &&tuple, FUN fun)
 Tuple iteration: perform some arbitrary operation on each element of a tuple.
 
template<class TUP , class FUN >
requires (tuple_like<remove_reference_t<TUP>>)
constexpr auto mapEach (TUP &&tuple, FUN fun)
 Apply some arbitrary function onto all elements of a tuple.
 
template<typename TYPES , class SRC >
Tuple< TYPESbuildTuple (SRC &&values)
 convenience shortcut to build a tuple from some suitable source data.
 
template<typename... TYPES>
std::string dump (std::tuple< TYPES... > const &tuple)
 convenience function to dump a given tuple's contents.
 
template<class X >
constexpr size_t indexOfType ()
 Find the index of the first incidence of a type in a type-sequence.
 
template<class X , class T , class... TYPES>
constexpr size_t indexOfType ()
 
template<typename TY >
std::string typeStr (TY const *obj=nullptr) noexcept
 failsafe human readable type display
 
template<typename TY >
disable_if< std::is_pointer< TY >, std::string > typeStr (TY const &ref) noexcept
 
std::string typeStr (void const *) noexcept
 
template<typename TY >
std::string typeSymbol (TY const *obj=nullptr)
 simple expressive symbol to designate a type
 
template<typename TY >
disable_if< std::is_pointer< TY >, std::string > typeSymbol (TY const &ref)
 
template<class TTX , class FUN >
void forEachIDX (FUN &&fun)
 Invoke a function (or λ) with index numbers derived from some variadic count.
 
template<class TTX , class FUN >
bool andAllIDX (FUN &&fun)
 
template<class TTX , class FUN >
bool orAnyIDX (FUN &&fun)
 
template<size_t idx, typename... ARGS>
constexpr auto pickArg (ARGS &&... args)
 Helper to single out one argument from a variadic argument pack.
 
template<size_t idx, typename DEFAULT , typename... ARGS>
constexpr auto pickInit (ARGS &&... args)
 Helper to pick one initialisation argument from a variadic argument pack, falling back to a default constructed element of type DEFAULT in case of insufficient number of variadic arguments.
 

Variables

const string BOTTOM_INDICATOR = "⟂"
 
const string FAILURE_INDICATOR = "↯"
 
const string VOID_INDICATOR = "void"
 
const string FUNCTION_INDICATOR = "Function"
 
const string BOOL_FALSE_STR = "false"
 
const string BOOL_TRUE_STR = "true"
 
NoUsableHashDefinition hash_value (...)
 declared for metaprogramming only, never defined
 
template<typename T >
static constexpr bool isConst_v = std::is_const_v<remove_reference_t<T>>
 
template<typename T >
static constexpr bool isLRef_v = std::is_lvalue_reference_v<T>
 
template<typename T >
static constexpr bool isRRef_v = std::is_rvalue_reference_v<T>
 
template<typename T >
static constexpr bool isRef_v = std::is_reference_v<T>
 

Typedef Documentation

◆ HasUsableHashDefinition

Definition at line 75 of file hash-standard.hpp.

◆ FunVoid

typedef function<void(void)> FunVoid

Definition at line 98 of file function-erasure.hpp.

◆ FunHolder

◆ FunPtrHolder

◆ _FunRet

template<typename FUN >
using _FunRet = _Fun<FUN>::Ret

abbreviation for referring to a function's return type

Definition at line 253 of file function.hpp.

◆ _FunArg

template<typename FUN >
using _FunArg = _DetectSingleArgFunction<FUN>::Arg

abbreviation for referring to a function's single Argument type

Definition at line 269 of file function.hpp.

◆ has_Arity

template<typename FUN , uint a>
using has_Arity = std::bool_constant<_Fun<FUN>::ARITY == a>

Definition at line 274 of file function.hpp.

◆ is_NullaryFun

Definition at line 277 of file function.hpp.

◆ is_UnaryFun

Definition at line 280 of file function.hpp.

◆ is_BinaryFun

Definition at line 283 of file function.hpp.

◆ is_TernaryFun

Definition at line 286 of file function.hpp.

◆ Tuple

template<typename TYPES >
using Tuple = BuildTupleType<TYPES>::Type

Build a std::tuple from types given as type sequence.

Remarks
for Lumiera, we deliberately use a dedicated template Types to mark a type sequence of types as such. This allows to pass such a sequence as first-class citizen. The standard library often (ab)uses the std::tuple for this purpose, which is an understandable, yet inferior design choice. We should always favour dedicated types over clever re-use of existing types.

Definition at line 342 of file tuple-helper.hpp.

◆ ExtractArg

template<class SRC , class TAR , size_t i>
using ExtractArg = ElementExtractor<SRC, TAR>::template Access<i>

Definition at line 439 of file tuple-helper.hpp.

◆ Prefix

template<class LI , uint l>
using Prefix = Splice<LI, Nil, l>::Front

extract prefix of given length

Definition at line 206 of file typelist-manip.hpp.

◆ Suffix

template<class LI , uint p>
using Suffix = Splice<LI, Nil, p>::Back

extract suffix starting at given pos

Definition at line 210 of file typelist-manip.hpp.

◆ NilNode

Definition at line 96 of file typelist.hpp.

◆ SizConst

template<size_t siz>
using SizConst = std::integral_constant<size_t, siz>

Definition at line 56 of file meta/util.hpp.

◆ enable_if

template<class Cond , class T = void>
using enable_if = enable_if_c<Cond::value, T>::type

SFINAE helper to control the visibility of specialisations and overloads.

explanation
This template needs to be interspersed somehow into a type expression, which is driven by an external, primary type parameter. Thus, it is possible to use it on an extraneous, possibly default template parameter, or when forming the return type of a function. The purpose is to remove a given definition from sight, unless a boolean condition Cond::value holds true. In the typical usage, this condition is suppled by a metafunction, i.e. a template, which detects some feature or other circumstantial condition with the types involved.
Remarks
this is a widely used facility, available both from boost and from the standard library. For the most common case, we roll our own variant here, which is slightly stripped down and a tiny bit more concise than the boost variant. This way, we can avoid a lot of boost inclusions, which always bear some weight.
See also
std::enable_if
Examples
/Werk/devel/lumi/src/lib/test/test-helper.hpp.

Definition at line 87 of file meta/util.hpp.

◆ disable_if

template<class Cond , class T = void>
using disable_if = enable_if_c<not Cond::value, T>::type

Definition at line 90 of file meta/util.hpp.

◆ Yes_t

helper types to detect the overload resolution chosen by the compiler

Definition at line 99 of file meta/util.hpp.

◆ extractFirst_t

template<typename... XS>
using extractFirst_t = _ExtractFirst<XS...>::Type

helper to extract the first argument from a variadic arg pack, if any

Definition at line 148 of file meta/util.hpp.

◆ disable_if_self

template<class SELF , typename ... ARGS>
using disable_if_self = disable_if<std::is_same<std::remove_cv_t<std::remove_reference_t<extractFirst_t<ARGS...> >> , SELF> >

helper to prevent a template constructor from shadowing inherited copy ctors

Definition at line 154 of file meta/util.hpp.

◆ enable_CustomStringConversion

toggle for explicit specialisations

Definition at line 192 of file meta/util.hpp.


Class Documentation

◆ lib::meta::_Vari

struct lib::meta::_Vari
+ Collaboration diagram for _Vari< L, XS >:

◆ lib::meta::_Vari< L, X >

struct lib::meta::_Vari< L, X >
Class Members
typedef X Ultima
typedef Nil Penult marker for undefined
typedef L< X > Remain
typedef L< X > Revers
typedef L<> Prefix
+ Collaboration diagram for _Vari< L, X >:

◆ lib::meta::_Vari< L, X, L< XS... > >

struct lib::meta::_Vari< L, X, L< XS... > >
Class Members
typedef L< X, XS... > Prepend
typedef L< XS..., X > Append
+ Collaboration diagram for _Vari< L, X, L< XS... > >:

◆ lib::meta::_Vari< L, X, XS... >

struct lib::meta::_Vari< L, X, XS... >
Class Members
typedef Penult Penult
typedef Ultima Ultima
typedef Prefix _Tail_Pre_
typedef Revers _Tail_Rev_
typedef L< XS... > Remain
typedef Prepend Prefix
typedef Prepend Revers
+ Collaboration diagram for _Vari< L, X, XS... >:

◆ lib::meta::_Vari< L, X1, X2 >

struct lib::meta::_Vari< L, X1, X2 >
Class Members
typedef X1 Penult
typedef X2 Ultima
typedef L< X1 > Prefix
typedef L< X2 > Remain
typedef L< X2, X1 > Revers
+ Collaboration diagram for _Vari< L, X1, X2 >:

◆ lib::meta::Append

struct lib::meta::Append
Class Members
typedef List > List
+ Collaboration diagram for Append< TY1, TY2 >:

◆ lib::meta::Append< Nil, Nil >

struct lib::meta::Append< Nil, Nil >
Class Members
typedef Nil List
+ Collaboration diagram for Append< Nil, Nil >:

◆ lib::meta::Append< Nil, Node< TY, TYPES > >

struct lib::meta::Append< Nil, Node< TY, TYPES > >
Class Members
typedef Node< TY, TYPES > List
+ Collaboration diagram for Append< Nil, Node< TY, TYPES > >:

◆ lib::meta::Append< Nil, TY2 >

struct lib::meta::Append< Nil, TY2 >
Class Members
typedef Node< TY2, Nil > List
+ Collaboration diagram for Append< Nil, TY2 >:

◆ lib::meta::Append< Node< TY, TYPES >, Nil >

struct lib::meta::Append< Node< TY, TYPES >, Nil >
Class Members
typedef Node< TY, TYPES > List
+ Collaboration diagram for Append< Node< TY, TYPES >, Nil >:

◆ lib::meta::Append< Node< TY, TYPES >, TAIL >

struct lib::meta::Append< Node< TY, TYPES >, TAIL >
Class Members
typedef List > List
+ Collaboration diagram for Append< Node< TY, TYPES >, TAIL >:

◆ lib::meta::Append< TY1, Nil >

struct lib::meta::Append< TY1, Nil >
Class Members
typedef Node< TY1, Nil > List
+ Collaboration diagram for Append< TY1, Nil >:

◆ lib::meta::Apply

struct lib::meta::Apply
Class Members
typedef TY List
+ Collaboration diagram for Apply< TY, _TRANS_ >:

◆ lib::meta::Apply< Node< TY, TYPES >, _TRANS_ >

struct lib::meta::Apply< Node< TY, TYPES >, _TRANS_ >
Class Members
typedef Type, typename List > List
+ Collaboration diagram for Apply< Node< TY, TYPES >, _TRANS_ >:

◆ lib::meta::ArrayAdapt

struct lib::meta::ArrayAdapt
+ Collaboration diagram for ArrayAdapt< TTT >:

◆ lib::meta::BuildFunType

struct lib::meta::BuildFunType
+ Collaboration diagram for BuildFunType< RET, ARGS >:

◆ lib::meta::BuildFunType< RET, Types< ARGS... > >

struct lib::meta::BuildFunType< RET, Types< ARGS... > >
Class Members
typedef RET(ARGS...) Sig
typedef _Fun< Sig > Fun
typedef function< Sig > Func
typedef Func Functor
+ Collaboration diagram for BuildFunType< RET, Types< ARGS... > >:

◆ lib::meta::BuildIndexSeq

struct lib::meta::BuildIndexSeq
Class Members
typedef template AppendElm< n-1 > Ascending
typedef template PrependElm< n-1 > Descending
typedef template template AppendElm< n-1+d > OffsetBy
typedef template template AppendElm< x > FilledWith
typedef Ascending First
typedef BuildIndexSeq<(n >c)? n-c :0 >::template OffsetBy< c > After
+ Collaboration diagram for BuildIndexSeq< n >:

◆ lib::meta::BuildIndexSeq< 0 >

struct lib::meta::BuildIndexSeq< 0 >
Class Members
typedef IndexSeq<> EmptySeq
typedef EmptySeq Ascending
typedef EmptySeq Descending
typedef EmptySeq OffsetBy
typedef EmptySeq FilledWith
typedef EmptySeq First
typedef EmptySeq After
+ Collaboration diagram for BuildIndexSeq< 0 >:

◆ lib::meta::BuildTupleAccessor< _X_, Types<>, TUP, i >

class lib::meta::BuildTupleAccessor< _X_, Types<>, TUP, i >
Class Members
typedef _X_< Nil, TUP, TUP, i > Product
+ Collaboration diagram for BuildTupleAccessor< _X_, Types<>, TUP, i >:

◆ lib::meta::Combine

struct lib::meta::Combine
Class Members
typedef List, NilNode >::List List
+ Collaboration diagram for Combine< X, _ENUM_ >:

◆ lib::meta::Combine< Nil, _ENUM_ >

struct lib::meta::Combine< Nil, _ENUM_ >
Class Members
typedef NilNode List
+ Collaboration diagram for Combine< Nil, _ENUM_ >:

◆ lib::meta::Combine< Node< TY, TYPES >, _ENUM_ >

struct lib::meta::Combine< Node< TY, TYPES >, _ENUM_ >
Class Members
typedef List, typename List >::List List
+ Collaboration diagram for Combine< Node< TY, TYPES >, _ENUM_ >:

◆ lib::meta::CombineFlags

struct lib::meta::CombineFlags
Class Members
typedef List List
+ Collaboration diagram for CombineFlags< FLAGS >:

◆ lib::meta::CondNode

struct lib::meta::CondNode
Class Members
typedef TAIL Next
+ Collaboration diagram for CondNode< bool, T, TAIL >:

◆ lib::meta::CondNode< true, T, TAIL >

struct lib::meta::CondNode< true, T, TAIL >
Class Members
typedef Node< T, TAIL > Next
+ Collaboration diagram for CondNode< true, T, TAIL >:

◆ lib::meta::Config

struct lib::meta::Config
+ Collaboration diagram for Config< f1, f2, f3, f4, f5 >:

◆ lib::meta::ConstAll

struct lib::meta::ConstAll
+ Collaboration diagram for ConstAll< TYPES >:

◆ lib::meta::ConstAll< Nil >

struct lib::meta::ConstAll< Nil >
Class Members
typedef Nil List
+ Collaboration diagram for ConstAll< Nil >:

◆ lib::meta::ConstAll< Node< TY, TYPES > >

struct lib::meta::ConstAll< Node< TY, TYPES > >
Class Members
typedef Node< add_const_t< TY >, typename List > List
+ Collaboration diagram for ConstAll< Node< TY, TYPES > >:

◆ lib::meta::CopySupport

struct lib::meta::CopySupport
Class Members
typedef NoCopyMoveSupport< I, D, B > Policy
+ Collaboration diagram for CopySupport< X, SEL >:

◆ lib::meta::CopySupport< X, enable_if< supports_cloning< X > > >

struct lib::meta::CopySupport< X, enable_if< supports_cloning< X > > >
Class Members
typedef CloneSupport< I, D, B > Policy
+ Collaboration diagram for CopySupport< X, enable_if< supports_cloning< X > > >:

◆ lib::meta::CopySupport< X, enable_if< supports_copy_and_assignment< X > > >

struct lib::meta::CopySupport< X, enable_if< supports_copy_and_assignment< X > > >
Class Members
typedef FullCopySupport< I, D, B > Policy
+ Collaboration diagram for CopySupport< X, enable_if< supports_copy_and_assignment< X > > >:

◆ lib::meta::CopySupport< X, enable_if< supports_only_move< X > > >

struct lib::meta::CopySupport< X, enable_if< supports_only_move< X > > >
Class Members
typedef MoveSupport< I, D, B > Policy
+ Collaboration diagram for CopySupport< X, enable_if< supports_only_move< X > > >:

◆ lib::meta::CountDown

struct lib::meta::CountDown
Class Members
typedef Nil List
+ Collaboration diagram for CountDown< X >:

◆ lib::meta::CountDown< Num< 0 > >

struct lib::meta::CountDown< Num< 0 > >
Class Members
typedef Node< Num< 0 >, Nil > List
+ Collaboration diagram for CountDown< Num< 0 > >:

◆ lib::meta::CountDown< Num< I > >

struct lib::meta::CountDown< Num< I > >
Class Members
typedef Node< Num< I >, typename CountDown< Num< I-1 > >::List > List
+ Collaboration diagram for CountDown< Num< I > >:

◆ lib::meta::Dissect

struct lib::meta::Dissect
+ Collaboration diagram for Dissect< TYPES >:

◆ lib::meta::Dissect< Nil >

struct lib::meta::Dissect< Nil >
Class Members
typedef Nil List
typedef Nil Head
typedef Nil First
typedef Nil Tail
typedef Nil Prefix
typedef Nil End
typedef Nil Last
+ Collaboration diagram for Dissect< Nil >:

◆ lib::meta::Dissect< Node< T, TYPES > >

struct lib::meta::Dissect< Node< T, TYPES > >
Class Members
typedef Node< T, TYPES > List the complete list
typedef T Head first element
typedef Node< T, Nil > First a list containing the first element
typedef TYPES Tail remainder of the list starting with the second elm.
typedef List Prefix all of the list, up to but excluding the last element
typedef Type End the last element
typedef Node< End, Nil > Last a list containing the last element
+ Collaboration diagram for Dissect< Node< T, TYPES > >:

◆ lib::meta::Distribute

struct lib::meta::Distribute
Class Members
typedef List List
+ Inheritance diagram for Distribute< TY1, TY2 >:
+ Collaboration diagram for Distribute< TY1, TY2 >:

◆ lib::meta::Distribute< Nil, TY >

struct lib::meta::Distribute< Nil, TY >
Class Members
typedef Nil List
+ Collaboration diagram for Distribute< Nil, TY >:

◆ lib::meta::Distribute< Node< TY, TYPES >, TAIL >

struct lib::meta::Distribute< Node< TY, TYPES >, TAIL >
Class Members
typedef List, typename List >::List List
+ Collaboration diagram for Distribute< Node< TY, TYPES >, TAIL >:

◆ lib::meta::ElementExtractor

struct lib::meta::ElementExtractor
+ Collaboration diagram for ElementExtractor< SRC, TAR >:

◆ lib::meta::enable_if_c

struct lib::meta::enable_if_c
Class Members
typedef T type
+ Collaboration diagram for enable_if_c< B, T >:

◆ lib::meta::enable_if_c< false, T >

struct lib::meta::enable_if_c< false, T >
+ Collaboration diagram for enable_if_c< false, T >:

◆ lib::meta::Filter

struct lib::meta::Filter
+ Collaboration diagram for Filter< TYPES, _P_ >:

◆ lib::meta::Filter< Nil, _P_ >

struct lib::meta::Filter< Nil, _P_ >
Class Members
typedef Nil List
+ Collaboration diagram for Filter< Nil, _P_ >:

◆ lib::meta::Filter< Node< TY, TYPES >, _P_ >

struct lib::meta::Filter< Node< TY, TYPES >, _P_ >
Class Members
typedef value, TY, typename List >::Next List
+ Collaboration diagram for Filter< Node< TY, TYPES >, _P_ >:

◆ lib::meta::Flag

struct lib::meta::Flag
+ Collaboration diagram for Flag< bit >:

◆ lib::meta::FlagOnOff

struct lib::meta::FlagOnOff
Class Members
typedef Node< F, NilNode > List
+ Collaboration diagram for FlagOnOff< F >:

◆ lib::meta::IndexSeq

struct lib::meta::IndexSeq
Class Members
typedef IndexSeq< idx..., i > AppendElm
typedef IndexSeq< i, idx... > PrependElm
+ Collaboration diagram for IndexSeq< idx >:

◆ lib::meta::InstancePlaceholder

struct lib::meta::InstancePlaceholder
+ Collaboration diagram for InstancePlaceholder< TAR >:

◆ lib::meta::InstantiateWithIndex

class lib::meta::InstantiateWithIndex
+ Collaboration diagram for InstantiateWithIndex< TYPES, _X_, BASE, i >:

◆ lib::meta::maxAlign

struct lib::meta::maxAlign
+ Collaboration diagram for maxAlign< TYPES >:

◆ lib::meta::maxSize

struct lib::meta::maxSize
+ Collaboration diagram for maxSize< TYPES >:

◆ lib::meta::Nil

struct lib::meta::Nil
Class Members
typedef Nil List
+ Collaboration diagram for Nil:

◆ lib::meta::No_t

struct lib::meta::No_t
Class Members
char more_than_one[4]
+ Collaboration diagram for No_t:

◆ lib::meta::Node

struct lib::meta::Node
Class Members
typedef Node List
typedef H Head
typedef T Tail
+ Collaboration diagram for Node< H, T >:

◆ lib::meta::NoUsableHashDefinition

struct lib::meta::NoUsableHashDefinition
Class Members
size_t more_than_one[2]
+ Collaboration diagram for NoUsableHashDefinition:

◆ lib::meta::Pick

struct lib::meta::Pick
Class Members
typedef Nil Type
+ Collaboration diagram for Pick< TYPES, i >:

◆ lib::meta::Pick< Node< TY, TYPES >, 0 >

struct lib::meta::Pick< Node< TY, TYPES >, 0 >
Class Members
typedef TY Type
+ Collaboration diagram for Pick< Node< TY, TYPES >, 0 >:

◆ lib::meta::Pick< Node< TY, TYPES >, i >

struct lib::meta::Pick< Node< TY, TYPES >, i >
Class Members
typedef Type Type
+ Collaboration diagram for Pick< Node< TY, TYPES >, i >:

◆ lib::meta::Pick< Types< TYPES... >, i >

struct lib::meta::Pick< Types< TYPES... >, i >
Class Members
typedef Shifted< Types< TYPES... >, i >::Head Type
+ Collaboration diagram for Pick< Types< TYPES... >, i >:

◆ lib::meta::PickLast

struct lib::meta::PickLast
+ Collaboration diagram for PickLast< TYPES >:

◆ lib::meta::PickLast< Nil >

struct lib::meta::PickLast< Nil >
Class Members
typedef Nil Type
typedef Nil List
+ Collaboration diagram for PickLast< Nil >:

◆ lib::meta::PickLast< Node< TY, Nil > >

struct lib::meta::PickLast< Node< TY, Nil > >
Class Members
typedef TY Type
typedef Nil List
+ Collaboration diagram for PickLast< Node< TY, Nil > >:

◆ lib::meta::PickLast< Node< TY, TYPES > >

struct lib::meta::PickLast< Node< TY, TYPES > >
Class Members
typedef Type Type
typedef List >::List List
+ Collaboration diagram for PickLast< Node< TY, TYPES > >:

◆ lib::meta::PickParametersFromSublist

struct lib::meta::PickParametersFromSublist
+ Collaboration diagram for PickParametersFromSublist< _X_ >:

◆ lib::meta::PrefixAll

struct lib::meta::PrefixAll
Class Members
typedef List, Nil > List
+ Collaboration diagram for PrefixAll< T, TY >:

◆ lib::meta::PrefixAll< T, Nil >

struct lib::meta::PrefixAll< T, Nil >
Class Members
typedef Nil List
+ Collaboration diagram for PrefixAll< T, Nil >:

◆ lib::meta::PrefixAll< T, NilNode >

struct lib::meta::PrefixAll< T, NilNode >
Class Members
typedef List, Nil > List
+ Collaboration diagram for PrefixAll< T, NilNode >:

◆ lib::meta::PrefixAll< T, Node< TY, TYPES > >

struct lib::meta::PrefixAll< T, Node< TY, TYPES > >
Class Members
typedef List, typename List > List
+ Collaboration diagram for PrefixAll< T, Node< TY, TYPES > >:

◆ lib::meta::Prepend

struct lib::meta::Prepend
+ Collaboration diagram for Prepend< T, TYPES >:

◆ lib::meta::Prepend< T, Types< TYPES... > >

struct lib::meta::Prepend< T, Types< TYPES... > >
Class Members
typedef Types< T, TYPES... > Seq
typedef List List
+ Collaboration diagram for Prepend< T, Types< TYPES... > >:

◆ lib::meta::RebindTupleTypes

struct lib::meta::RebindTupleTypes
Class Members
typedef Seq Seq
typedef List List
+ Collaboration diagram for RebindTupleTypes< TYPES >:

◆ lib::meta::RebindTupleTypes< std::tuple< TYPES... > >

struct lib::meta::RebindTupleTypes< std::tuple< TYPES... > >
Class Members
typedef Seq Seq
typedef List List
+ Collaboration diagram for RebindTupleTypes< std::tuple< TYPES... > >:

◆ lib::meta::RebindVariadic

struct lib::meta::RebindVariadic
Class Members
typedef X< ARGS... > Type
+ Collaboration diagram for RebindVariadic< X, ARGS >:

◆ lib::meta::RebindVariadic< X, U< ARGS... > >

struct lib::meta::RebindVariadic< X, U< ARGS... > >
Class Members
typedef X< ARGS... > Type
+ Collaboration diagram for RebindVariadic< X, U< ARGS... > >:

◆ lib::meta::RefTraits

struct lib::meta::RefTraits
Class Members
typedef TY Value
typedef TY * Pointer
typedef TY & Reference
+ Collaboration diagram for RefTraits< TY >:

◆ lib::meta::RefTraits< TY & >

struct lib::meta::RefTraits< TY & >
Class Members
typedef TY Value
typedef TY * Pointer
typedef TY & Reference
+ Collaboration diagram for RefTraits< TY & >:

◆ lib::meta::RefTraits< TY && >

struct lib::meta::RefTraits< TY && >
Class Members
typedef TY Value
typedef TY * Pointer
typedef TY & Reference
+ Collaboration diagram for RefTraits< TY && >:

◆ lib::meta::RefTraits< TY * >

struct lib::meta::RefTraits< TY * >
Class Members
typedef TY * Value
typedef TY ** Pointer
typedef TY *& Reference
+ Collaboration diagram for RefTraits< TY * >:

◆ lib::meta::Repeat

struct lib::meta::Repeat
Class Members
typedef Seq Rem
typedef Seq Seq
+ Collaboration diagram for Repeat< T, N >:

◆ lib::meta::Repeat< T, 0 >

struct lib::meta::Repeat< T, 0 >
Class Members
typedef Types<> Seq
+ Collaboration diagram for Repeat< T, 0 >:

◆ lib::meta::Shifted< TYPES, 0 >

struct lib::meta::Shifted< TYPES, 0 >
Class Members
typedef TYPES Type
typedef Head Head
Warning
may be Nil in case of an empty list
+ Collaboration diagram for Shifted< TYPES, 0 >:

◆ lib::meta::Splice

struct lib::meta::Splice
+ Collaboration diagram for Splice< BASE, OVERLAY, i >:

◆ lib::meta::Splice< Nil, XX, i >

struct lib::meta::Splice< Nil, XX, i >
Class Members
typedef Nil List
typedef Nil Front
typedef Nil Back
+ Collaboration diagram for Splice< Nil, XX, i >:

◆ lib::meta::Splice< Node< B, BS >, Nil, 0 >

struct lib::meta::Splice< Node< B, BS >, Nil, 0 >
Class Members
typedef Node< B, BS > List
typedef Nil Front
typedef Node< B, BS > Back
+ Collaboration diagram for Splice< Node< B, BS >, Nil, 0 >:

◆ lib::meta::Splice< Node< B, BS >, Node< O, OS >, 0 >

struct lib::meta::Splice< Node< B, BS >, Node< O, OS >, 0 >
Class Members
typedef List > List
typedef Nil Front
typedef typename Back Back
+ Collaboration diagram for Splice< Node< B, BS >, Node< O, OS >, 0 >:

◆ lib::meta::Splice< Node< B, BS >, OVERLAY, i >

struct lib::meta::Splice< Node< B, BS >, OVERLAY, i >
Class Members
typedef List > List
typedef Front > Front
typedef typename Back Back
+ Collaboration diagram for Splice< Node< B, BS >, OVERLAY, i >:

◆ lib::meta::Split

struct lib::meta::Split
+ Collaboration diagram for Split< TYPES >:

◆ lib::meta::Split< Types< T1, TS... > >

struct lib::meta::Split< Types< T1, TS... > >
Class Members
typedef List List
typedef T1 Head
typedef Types< T1 > First
typedef Types< TS... > Tail
typedef List PrefixList
typedef List TailList
typedef Seq Prefix
typedef Type End
typedef Types< End > Last
+ Collaboration diagram for Split< Types< T1, TS... > >:

◆ lib::meta::Split< Types<> >

struct lib::meta::Split< Types<> >
Class Members
typedef Nil List
typedef Nil Head
typedef Types<> First
typedef Types<> Tail
typedef Nil PrefixList
typedef Nil TailList
typedef Types<> Prefix
typedef Types<> Last
typedef Nil End
+ Collaboration diagram for Split< Types<> >:

◆ lib::meta::Strip

struct lib::meta::Strip
Class Members
typedef conditional_t< is_reference_v< X >, conditional_t< is_rvalue_reference_v< X >, remove_cv_t< remove_reference_t< X > > &&, remove_cv_t< remove_reference_t< X > > & >, remove_cv_t< X > > TypeUnconst
typedef remove_reference_t< TypeUnconst > TypeReferred
typedef remove_pointer_t< TypeReferred > TypePointee
typedef remove_cv_t< TypePointee > TypePlain
typedef Type Type
+ Inheritance diagram for Strip< X >:
+ Collaboration diagram for Strip< X >:

◆ lib::meta::TupleClosureBuilder

struct lib::meta::TupleClosureBuilder
+ Inheritance diagram for TupleClosureBuilder< PAR >:
+ Collaboration diagram for TupleClosureBuilder< PAR >:

◆ lib::meta::Types

struct lib::meta::Types
+ Collaboration diagram for Types< TYPES >:

◆ lib::meta::Types< Node< H, T > >

struct lib::meta::Types< Node< H, T > >
Class Members
typedef Node< H, T > List
typedef Seq >::Seq Seq
+ Collaboration diagram for Types< Node< H, T > >:

◆ lib::meta::Types< T, TS... >

struct lib::meta::Types< T, TS... >
Class Members
typedef List > List
typedef Types Seq
+ Collaboration diagram for Types< T, TS... >:

◆ lib::meta::Types<>

struct lib::meta::Types<>
Class Members
typedef Nil List
typedef Types<> Seq
+ Collaboration diagram for Types<>:

◆ lib::meta::ValueTypeBinding

struct lib::meta::ValueTypeBinding
Class Members
typedef Value value_type
typedef Reference reference
typedef Pointer pointer
+ Collaboration diagram for ValueTypeBinding< TY, SEL >:

◆ lib::meta::ValueTypeBinding< TY, enable_if< use_ValueTypebindings< TY > > >

struct lib::meta::ValueTypeBinding< TY, enable_if< use_ValueTypebindings< TY > > >
Class Members
typedef Value _SrcType
typedef value_type value_type
typedef reference reference
typedef pointer pointer
+ Collaboration diagram for ValueTypeBinding< TY, enable_if< use_ValueTypebindings< TY > > >:

◆ lib::meta::ValueTypeBinding< vector< Scope >::const_reverse_iterator >

struct lib::meta::ValueTypeBinding< vector< Scope >::const_reverse_iterator >
Class Members
typedef const Scope value_type
typedef Scope const & reference
typedef const Scope * pointer
+ Collaboration diagram for ValueTypeBinding< vector< Scope >::const_reverse_iterator >:

Function Documentation

◆ demangleCxx()

std::string demangleCxx ( Literal  rawName)

Fallback type-ID:

reverse the effect of C++ name mangling.

Returns
unaltered internal type-ID
string in language-level form of a C++ type or object name, or a string with the original input if demangling fails.
Warning
implementation relies on the cross vendor C++ ABI in use by GCC and compatible compilers, so portability is limited. The implementation is accessed through libStdC++ Name representation in emitted object code and type IDs is essentially an implementation detail and subject to change.
Examples
/Werk/devel/lumi/src/lib/test/test-helper.hpp.

Definition at line 159 of file format-obj.cpp.

References demangleCxx().

Referenced by demangleCxx(), humanReadableTypeID(), primaryTypeComponent(), and TypeDemangling_test::run().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ humanReadableTypeID()

std::string humanReadableTypeID ( Literal  rawType)

pretty-print an internal C++ type representation

implementation notes
  • we do not strip type adornments like const, & or *, however, the typical usage from within util::typeStr() is arranged in a way to absorb these adornments by the way the template signatures are defined
  • we do simplify the type display and strip some obnoxious namespace prefixes with the help of std::regex_replace
  • we perform those simplifying rewrites in place thus overwriting the result string. This exploits the fact that the replacements are always shorter than what is being replaced (beware).
  • standard regular expressions can be assumed to be threadsafe. Thus, we're able to build an embedded shared static variable on demand and use the performance optimisation offered by the standard library
  • performance wise we'll assume the transformation happens within the cache, so it doesn't make much of a difference if we scan the same comparatively short string multiple times
See also
format-obj.cpp implementation
Examples
/Werk/devel/lumi/src/lib/test/test-helper.hpp.

Definition at line 190 of file format-obj.cpp.

References demangleCxx(), and TYP_EXP.

Referenced by TypeDisplay_test::run(), sanitisedFullTypeName(), lib::test::showType(), and typeStr().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ primaryTypeComponent()

std::string primaryTypeComponent ( Literal  rawType)

extract core name component from a raw type spec

implementation notes
We want to get at the name of the most relevant type entity. This in itself is a heuristic. But we can work on the assumption, that we get a sequence of nested namespaces and type names, and we'll be interested in the last, the innermost of these types. In the most general case, each type could be templated, and thus will be followed by parameter specs enclosed in angle braces. Behind this spec, only type adornments will follow. Thus we'll inspect the string from the back side, skipping over all type parameter contents, until we reach brace level zero again. From this point, we have to search backwards to the first namespace separator ::
Warning
we acknowledge this function can fail in various ways, some of which will be indicated by returning the string "void". But it may well happen that the returned string contains whitespace, superfluous punctuation or even the whole demangled type specification as is.
Returns
simple identifier possibly "the" type
Warning
implemented lexically, not necessarily correct!

Definition at line 268 of file format-obj.cpp.

References demangleCxx(), FUNCTION_INDICATOR, typeStr(), and VOID_INDICATOR.

Referenced by TypeDisplay_test::run(), lib::idi::typeSymbol(), and typeSymbol().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ sanitisedFullTypeName()

std::string sanitisedFullTypeName ( lib::Literal  rawName)

build a sanitised ID from full type name

Definition at line 306 of file format-obj.cpp.

References humanReadableTypeID(), and util::sanitise().

Referenced by TypeDisplay_test::run(), and lib::idi::typeFullID().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ sanitisedSymbol()

std::string sanitisedSymbol ( std::string const )

condense a string and retain only valid identifiers

Returns
string starting with letter, followed by letters, digits and underscore

Definition at line 313 of file format-obj.cpp.

Referenced by TypeDisplay_test::run().

+ Here is the caller graph for this function:

◆ isFunMember()

template<typename SIG , typename FUN >
constexpr auto isFunMember ( FUN  )
inlineconstexpr

Helper to pick up a member field for verification.

Template Parameters
SIGsignature of the function like entity expected
FUNaddress- or member-pointer, e.g. &Class::member
Returns
suitably parametrised has_Sig instance (which is bool convertible)
Remarks
intended for use with generic types, when expecting a somehow invokable member, irrespective if a static function, member function or functor object

Definition at line 332 of file function.hpp.

References isFunMember().

Referenced by isFunMember().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ lateBindInstance()

template<class W , class TUP >
constexpr auto lateBindInstance ( W &  instance,
TUP &&  invocation 
)
inlineconstexpr

Fix-up the arguments for a member-function invocation, allowing to inject the actual this instance into an existing argument sequence.

Remarks
invocation of a member function requires to supply the object instance as first element in the argument list; sometimes this poses a design challenge, since the actual instance may not be known at the point where the other arguments are prepared. As a remedy, the position of the instance pointer can be marked with the InstancePlaceholder, allowing to splice in the actual pointer when known.

Definition at line 387 of file function.hpp.

References lateBindInstance().

Referenced by LateBindInstance_test::demonstrateUsage(), lateBindInstance(), LateBindInstance_test::verify_cornerCases(), and LateBindInstance_test::verify_forwarding().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ equals_safeInvoke()

template<typename X >
bool equals_safeInvoke ( X const x1,
X const x2 
)
inline

Definition at line 49 of file maybe-compare.hpp.

References Comparator< X >::equals(), and equals_safeInvoke().

Referenced by equals_safeInvoke().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ unwrap()

template<typename X >
Unwrap< X >::Type & unwrap ( X const wrapped)

convenience shortcut: unwrapping free function.

Returns
reference to the bare element.
Warning
this function is dangerous: it strips away any managing smart-ptr and any const! You might even access and return a reference to an anonymous temporary.

Definition at line 240 of file trait.hpp.

References Unwrap< X >::extract().

Referenced by util::and_all(), util::first(), util::for_each(), util::has_any(), and util::last().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ArrayAdapt()

template<typename... TTT>
ArrayAdapt ( TTT...  ) -> ArrayAdapt< std::decay_t< TTT >... >

◆ getElm()

template<std::size_t idx, class TUP >
requires (tuple_like<std::remove_reference_t<TUP>>)
decltype(auto) getElm ( TUP &&  tup)

Helper for abstracted / unified access to member elements of any tuple-like

Remarks
preferably uses a get<i> member function, falling back to a free function get, which is found by ADL.

Definition at line 139 of file tuple-helper.hpp.

◆ apply()

template<class FUN , class TUP >
requires (tuple_like<remove_reference_t<TUP>>)
constexpr decltype(auto) apply ( FUN &&  f,
TUP &&  tup 
)
constexprnoexcept

Replacement for std::apply — yet applicable to tuple-like custom types.

For unclear reasons, the standard chooses to reject such custom types, and only allows a fixed set of explicitly defined facilities from the Stdlib (tuple, pair, array, and some ranges stuff).

Todo:
6/2025 as a first step, this replicates the implementation from C++17; the second step would be to constrain this to a concept tuple_like

Definition at line 209 of file tuple-helper.hpp.

Referenced by lib::meta::func::bindArgTuple(), ProductCore< ITUP >::checkPoint(), forEach(), mapEach(), and TupleClosureBuilder< TUP< PARS... > >::wrapBuilder().

+ Here is the caller graph for this function:

◆ forEach()

template<class TUP , class FUN >
requires (tuple_like<remove_reference_t<TUP>>)
constexpr void forEach ( TUP &&  tuple,
FUN  fun 
)
constexpr

Tuple iteration: perform some arbitrary operation on each element of a tuple.

Note
the given functor must be generic, since each position of the tuple may hold a data element of different type.
Remarks
credits to David Vandevoorde (member of C++ committee) for using std::apply to unpack the tuple's contents into an argument pack and then employ a fold expression with the comma operator.

Definition at line 230 of file tuple-helper.hpp.

References apply().

Referenced by CSVLine::CSVLine(), TupleHelper_test::demonstrate_generic_iteration(), ProductCore< ITUP >::depth(), ProductCore< ITUP >::expandChildren(), WeavingBuilder< POL, PROT >::fillDefaultBufferTypes(), DataTable< TAB >::forAllColumns(), ProductCore< ITUP >::iterNext(), and DataCSV_test::verify_rowHandling().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ mapEach()

template<class TUP , class FUN >
requires (tuple_like<remove_reference_t<TUP>>)
constexpr auto mapEach ( TUP &&  tuple,
FUN  fun 
)
constexpr

Apply some arbitrary function onto all elements of a tuple.

Returns
a new tuple constructed from the results of this function
Note
the functor must be generic and able to work with all element types
Warning
pay attention to references; the function can take arguments by-ref and manipulate them (side-effect), and it may return references, which will be placed as such into the result tuple; furthermore, the argument tuple can also be taken as reference...
Remarks
The tuple constructor invocation is preceded by a regular argument evaluation, which has unspecified evaluation order (even in C++17); no assumptions can be made regarding the order the functor will see the source tuple elements. Notably this differs from forEach, where a fold-expression with comma-operator is used, which is guaranteed to evaluate from left to right.

Definition at line 255 of file tuple-helper.hpp.

References apply().

Referenced by TupleHelper_test::demonstrate_generic_iteration(), and lib::zip().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ buildTuple()

template<typename TYPES , class SRC >
Tuple< TYPES > buildTuple ( SRC &&  values)

convenience shortcut to build a tuple from some suitable source data.

For this to work, there needs to be a partial specialisation for (ElementExtractor) to deal with the concrete source type given.

Note
we provide such a specialisation for Record<GenNode>, which allows us to fill an (argument) tuple from a sequence of generic data values, with run-time type compatibility check.
See also
tuple-record-init.hpp

Definition at line 453 of file tuple-helper.hpp.

References buildTuple().

Referenced by buildTuple().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ dump()

template<typename... TYPES>
std::string dump ( std::tuple< TYPES... > const tuple)
inline

convenience function to dump a given tuple's contents.

Using the BuildTupleAccessor, we layer a stack of Instantiations of the TupleElementDisplayer temporarily on top of the given tuple, just to invoke a recursive call chain through these layers and get a string representation of each element in the tuple.

Definition at line 575 of file tuple-helper.hpp.

References dump().

Referenced by TupleHelper_test::demonstrate_generic_iteration(), dump(), StringConv< std::tuple< TYPES... > >::invoke(), and LateBindInstance_test::verify_cornerCases().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ indexOfType() [1/2]

template<class X >
constexpr size_t indexOfType ( )
constexpr

Find the index of the first incidence of a type in a type-sequence.

Note
static assertion if the type is not in the type sequence
See also
https://stackoverflow.com/questions/18063451/get-index-of-a-tuple-elements-type/60868425#60868425

Definition at line 55 of file typeseq-util.hpp.

Referenced by indexOfType().

+ Here is the caller graph for this function:

◆ indexOfType() [2/2]

template<class X , class T , class... TYPES>
constexpr size_t indexOfType ( )
constexpr

Definition at line 63 of file typeseq-util.hpp.

References indexOfType().

+ Here is the call graph for this function:

◆ typeStr() [1/3]

template<typename TY >
std::string typeStr ( TY const obj = nullptr)
inlinenoexcept

failsafe human readable type display

Returns
string representing the C++ type.
Remarks
the purpose of this function is diagnostics and unit-testing. When possible, RTTI is exposed, otherwise the implementation falls back on the static type as seen by the compiler on usage site. An attempt is made to de-mangle and further simplify the type string, leaving out some common (hard wired) namespace prefixes, and stripping typical adornments like const, * and &
almost all calls will enter through the const& variant of this function, since C++ considers this best match in template substitution. Thus, we deliberately force calls with pointer to enter here, since we do want the pointer itself (and not a pointer to the pointer). We then pass the "object" as so called "glvalue" to the typeid() function, so to get the evaluation of RTTI, when applicable.
Warning
this function does string transformations behind the scene, and thus should not be used in performance critical context. Moreover, the returned type string is not necessarily exact and re-parsable.

Definition at line 327 of file meta/util.hpp.

References humanReadableTypeID(), and typeStr().

Referenced by VariadicArgumentPicker_test::check_pickInit(), Tangible::operator string(), N< n >::operator string(), primaryTypeComponent(), FunctionSignature_test::run(), TypeDisplay_test::run(), typeStr(), typeStr(), typeStr(), IterExplorer_test::verify_combinedExpandTransform(), TextTemplate_test::verify_ETD_binding(), MetaUtils_test::verify_genericTypeDisplay(), and TextTemplate_test::verify_Map_binding().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ typeStr() [2/3]

template<typename TY >
disable_if< std::is_pointer< TY >, std::string > typeStr ( TY const ref)
inlinenoexcept

Definition at line 339 of file meta/util.hpp.

References typeStr().

+ Here is the call graph for this function:

◆ typeStr() [3/3]

std::string typeStr ( void const )
inlinenoexcept

Definition at line 345 of file meta/util.hpp.

References typeStr(), and VOID_INDICATOR.

+ Here is the call graph for this function:

◆ typeSymbol() [1/2]

template<typename TY >
std::string typeSymbol ( TY const obj = nullptr)
inline

simple expressive symbol to designate a type

Returns
single word identifier, derived from the full type name, not necessarily correct or unique

Definition at line 359 of file meta/util.hpp.

References primaryTypeComponent().

Referenced by _Fmt::Converter< SP, lib::meta::enable_if< _shall_show_smartWrapper< SP > > >::dump(), and StringConv< SP, show_SmartPointer< SP > >::invoke().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ typeSymbol() [2/2]

template<typename TY >
disable_if< std::is_pointer< TY >, std::string > typeSymbol ( TY const ref)
inline

Definition at line 369 of file meta/util.hpp.

◆ forEachIDX()

template<class TTX , class FUN >
void forEachIDX ( FUN &&  fun)
inline

Invoke a function (or λ) with index numbers derived from some variadic count.

Notably this construct can be used for compile-time iteration over a structure. Instances of std::integral_constant are passed in sequence to the functor. The size of the index sequence is derived using a ElmTypes specialisation

  • if the type TTX is tuple-like, then std::tuple_size<TTX> is used
  • otherwise, if the type is a type sequence (Types<T...>), then the size of this meta sequence is used
  • otherwise, sequence-size ≡ 1 is used as fall-back

Definition at line 281 of file variadic-helper.hpp.

References forEachIDX().

Referenced by forEachIDX().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ andAllIDX()

template<class TTX , class FUN >
bool andAllIDX ( FUN &&  fun)
inline

Definition at line 288 of file variadic-helper.hpp.

◆ orAnyIDX()

template<class TTX , class FUN >
bool orAnyIDX ( FUN &&  fun)
inline

Definition at line 295 of file variadic-helper.hpp.

◆ pickArg()

template<size_t idx, typename... ARGS>
constexpr auto pickArg ( ARGS &&...  args)
inlineconstexpr

Helper to single out one argument from a variadic argument pack.

Template Parameters
idxthe index number (zero based) of the argument to select
Remarks
typically this function is used "driven" by an likewise variadic index sequence, where the index sequence itself is picked up by a pattern match; this usage pattern allows arbitrarily to handle some of the arguments of a variable argument list, as determined by the index sequence passed in.

Definition at line 370 of file variadic-helper.hpp.

References pickArg().

Referenced by pickArg().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ pickInit()

template<size_t idx, typename DEFAULT , typename... ARGS>
constexpr auto pickInit ( ARGS &&...  args)
inlineconstexpr

Helper to pick one initialisation argument from a variadic argument pack, falling back to a default constructed element of type DEFAULT in case of insufficient number of variadic arguments.

Template Parameters
idxthe index number (zero based) of the argument to select
DEFALUTtype of the default element to construct as fallback

Definition at line 386 of file variadic-helper.hpp.

References pickInit().

Referenced by pickInit().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Variable Documentation

◆ BOTTOM_INDICATOR

const std::string BOTTOM_INDICATOR = "⟂"
extern

Definition at line 299 of file meta/util.hpp.

◆ FAILURE_INDICATOR

const std::string FAILURE_INDICATOR = "↯"
extern

Definition at line 298 of file meta/util.hpp.

Referenced by Variant< TYPES >::Buff< TY >::indicateTypeMismatch().

◆ VOID_INDICATOR

const std::string VOID_INDICATOR = "void"
extern

Definition at line 300 of file meta/util.hpp.

Referenced by primaryTypeComponent(), and typeStr().

◆ FUNCTION_INDICATOR

const std::string FUNCTION_INDICATOR = "Function"
extern

Definition at line 297 of file meta/util.hpp.

Referenced by primaryTypeComponent().

◆ BOOL_FALSE_STR

const std::string BOOL_FALSE_STR = "false"
extern

Definition at line 302 of file meta/util.hpp.

Referenced by util::showBool().

◆ BOOL_TRUE_STR

const std::string BOOL_TRUE_STR = "true"
extern

Definition at line 303 of file meta/util.hpp.

Referenced by util::showBool().

◆ hash_value

NoUsableHashDefinition hash_value(...) (   ...)

declared for metaprogramming only, never defined

◆ isConst_v

template<typename T >
constexpr bool isConst_v = std::is_const_v<remove_reference_t<T>>
staticconstexpr

Definition at line 111 of file trait.hpp.

◆ isLRef_v

template<typename T >
constexpr bool isLRef_v = std::is_lvalue_reference_v<T>
staticconstexpr

Definition at line 113 of file trait.hpp.

◆ isRRef_v

template<typename T >
constexpr bool isRRef_v = std::is_rvalue_reference_v<T>
staticconstexpr

Definition at line 115 of file trait.hpp.

◆ isRef_v

template<typename T >
constexpr bool isRef_v = std::is_reference_v<T>
staticconstexpr

Definition at line 117 of file trait.hpp.