![]() |
Lumiera 0.pre.04
»edit your freedom«
|
Simple and lightweight helpers for metaprogramming and type detection. More...
Go to the source code of this file.
Simple and lightweight helpers for metaprogramming and type detection.
This header is a collection of very basic type detection and metaprogramming utilities.
Definition in file meta/util.hpp.
Namespaces | |
| namespace | std |
| STL namespace. | |
| namespace | lib |
| Implementation namespace for support and library code. | |
| namespace | lib::meta |
| namespace | lib::meta::anonymous_namespace{util.hpp} |
| namespace | util |
Typedefs | |
| 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 | |
Functions | |
| 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 | |
| string | demangleCxx (Literal rawName) |
| Fallback type-ID: | |
| 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) |
| std::string | showBool (bool yes) noexcept |
| human readable display of boolean values | |
| string | showDouble (double) noexcept |
| pretty-print a double in (rounded) fixed-point format | |
| string | showFloat (float val) noexcept |
| string | showDecimal (double) noexcept |
| show maximum reproducible decimal representation | |
| string | showDecimal (float val) noexcept |
| string | showDecimal (f128 val) noexcept |
| string | showComplete (double) noexcept |
| show enough decimal digits to represent every distinct value | |
| string | showComplete (float val) noexcept |
| string | showComplete (f128 val) noexcept |
| string | showSize (size_t val) noexcept |
| string | showAdr (void const *addr) noexcept |
| pretty-print an address as hex-suffix | |
| template<typename X > | |
| lib::meta::disable_if< std::is_pointer< X >, std::string > | showAdr (X &elm) noexcept |
| template<typename X > | |
| std::string | showPtr (X *ptr=nullptr) |
| diagnostics helper for explicitly indicating pointers | |
| template<typename SP > | |
| std::string | showSmartPtr (SP const &smPtr, std::string label="smP") |
| uint | operator""_KiB (ullong const siz) |
| uint | operator""_MiB (ullong const siz) |
| ullong | operator""_GiB (ullong const siz) |
| struct lib::meta::enable_if_c |
| struct lib::meta::enable_if_c< false, T > |
Collaboration diagram for enable_if_c< false, T >:| struct lib::meta::No_t |
| struct lib::meta::anonymous_namespace{util.hpp}::_ExtractFirst |
| struct lib::meta::anonymous_namespace{util.hpp}::_ExtractFirst< X, XS... > |
| struct lib::meta::can_convertToString::Probe |
Collaboration diagram for can_convertToString< X >::Probe< XX, i >:| struct lib::meta::has_FunctionOperator::Probe |
Collaboration diagram for has_FunctionOperator< FUN >::Probe< FF, SEL >:Definition at line 509 of file meta/util.hpp.
Definition at line 515 of file meta/util.hpp.
Definition at line 521 of file meta/util.hpp.