![]() |
Lumiera 0.pre.04
»edit your freedom«
|
Testing a combination of std::function objects and metaprogramming. More...
Go to the source code of this file.
Testing a combination of std::function objects and metaprogramming.
Unit test TupleClosure_test demonstrates how to pre-bind some values for construction of tuple-like objects.
Argument types will be extracted and represented as typelist, so they can be manipulated at compile time. This test uses some test functions and systematically applies or binds them to corresponding data tuples. Moreover, closure objects will be constructed in various flavours, combining a function object and a set of parameters.
Definition in file function-closure-test.cpp.
#include "lib/test/run.hpp"#include "lib/test/test-helper.hpp"#include "lib/meta/typelist.hpp"#include "lib/meta/typelist-manip.hpp"#include "lib/meta/function.hpp"#include "lib/meta/function-closure.hpp"#include "meta/typelist-diagnostics.hpp"#include "meta/tuple-diagnostics.hpp"Namespaces | |
| namespace | lib |
| Implementation namespace for support and library code. | |
| namespace | lib::meta |
| namespace | lib::meta::test |
| namespace | lib::meta::test::anonymous_namespace{function-closure-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 | FunctionClosure_test |
Functions | |
| template<char i, char ii, char iii> | |
| int | getNumberz (Num< i > one, Num< ii > two, Num< iii > three) |
| special test fun accepting the terrific Num types | |
| int | fun0 () |
| int | fun1 (int i1) |
| int | fun2 (int i1, int i2) |
| int | fun3 (int i1, int i2, int i3) |
| LAUNCHER (FunctionClosure_test, "unit common") | |
| Register this test class... | |