Lumiera 0.pre.04~rc.1
»edit your freedom«
Loading...
Searching...
No Matches
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>

Namespaces

namespace  lib
 Implementation namespace for support and library code.
 
namespace  lib::meta
 
namespace  lib::meta::test
 
namespace  lib::meta::test::anonymous_namespace{typelist-manip-test.cpp}
 

Typedefs

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

Classes

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

Functions

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

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 > >: