Lumiera  0.pre.03
»edit your freedom«
typelist-manip-test.cpp File Reference

Go to the source code of this file.

Description

checking the correct working of simple list manipulation metafunctions

The semi-automatic assembly of processing node invocation code utilises some metaprogramming magic built upon simple list manipulation. As template metaprogramming is kind-of functional programming, most of this is done by recursion. To check the correct working, this test uses some constant-wrapper types and a debugging template which will print these constant numbers, thus allowing to verify in the output if various lists of such constant-wrapper types were manipulated as expected.

See also
typelist-test.cpp
typelist-util.hpp
nodewiring-config.hpp real world usage example

Definition in file typelist-manip-test.cpp.

#include "lib/test/run.hpp"
#include "lib/meta/generator.hpp"
#include "lib/meta/typelist-manip.hpp"
#include "meta/typelist-diagnostics.hpp"
#include <type_traits>
#include <iostream>

Classes

struct  TypeListManip_test::AddConst2< X >
 
struct  TypeListManip_test::AddConst2< Num< I > >
 
struct  TypeListManip_test::IsEven< X >
 
struct  TypeListManip_test::IsEven< Num< I > >
 
class  TypeListManip_test
 

Typedefs

typedef Types< Num< 1 >, Num< 2 >, Num< 3 > >::List List1
 
typedef Types< Num< 5 >, Num< 6 >, Num< 7 > >::List List2
 

Functions

 LAUNCHER (TypeListManip_test, "unit common")
 Register this test class... More...
 

Namespaces

 lib
 Implementation namespace for support and library code.
 

Class Documentation

◆ lib::meta::test::TypeListManip_test::AddConst2

struct lib::meta::test::TypeListManip_test::AddConst2
Class Members
typedef X Type
+ Collaboration diagram for TypeListManip_test::AddConst2< X >:

◆ lib::meta::test::TypeListManip_test::AddConst2< Num< I > >

struct lib::meta::test::TypeListManip_test::AddConst2< Num< I > >
Class Members
typedef Num< I+2 > Type
+ Collaboration diagram for TypeListManip_test::AddConst2< Num< I > >:

Function Documentation

◆ LAUNCHER()

lib::meta::test::LAUNCHER ( TypeListManip_test  ,
"unit common"   
)

Register this test class...