Lumiera  0.pre.03
»edit your freedom«
MetaUtils_test Class Reference

Description

Test:
verify basic type trait and metaprogramming helpers.
  • marker types to tell which overload the compiler picks
  • simple trait to detect the possibility of a string conversion
  • trait to detect a typelist type

Definition at line 55 of file meta-utils-test.cpp.

Classes

struct  SomehowStringy
 
class  SomehowSubSub
 
struct  SomehowSubtle
 
class  Something
 
class  SubString
 

Private Types

typedef Types< >::List EmptyList
 
typedef Types< int, uint, int64_t, uint64_t >::List TheList
 

Private Member Functions

void detect_stringConversion ()
 
void detect_typeList ()
 
void run (Arg)
 
void verify_basicTypeProbing ()
 
void verify_genericTypeDisplay ()
 

Static Private Member Functions

template<typename TY >
static bool can_convert (TY const &)
 
static Yes_t probe (int)
 
static No_t probe (...)
 

Class Documentation

◆ lib::meta::test::MetaUtils_test::Something

class lib::meta::test::MetaUtils_test::Something
+ Collaboration diagram for MetaUtils_test::Something:

Member Function Documentation

◆ verify_basicTypeProbing()

void verify_basicTypeProbing ( )
inlineprivate
Test:
demonstrate the basic type trait detection technique:
  • we have two overloads with differing return type
  • we form a function call expression
  • by investigating the return type, we can figure out which overload the compiler picks.

Definition at line 75 of file meta-utils-test.cpp.

+ Inheritance diagram for MetaUtils_test:
+ Collaboration diagram for MetaUtils_test:

The documentation for this class was generated from the following file: