![]() |
Lumiera 0.pre.04~rc.1
»edit your freedom«
|
Support for writing metaprogramming unit-tests dealing with typelists and flags. More...
Go to the source code of this file.
Support for writing metaprogramming unit-tests dealing with typelists and flags.
a Printer template usable for debugging the structure of a typelist built upon some simple debugging-style types. Examples being a Num<int> template, or the Flag type. A Printer type generated from this template provides a static show() function. The string returned from this function visualises the structure of the typelist provided as parameter to the Printer template.
Definition in file typelist-diagnostics.hpp.
#include "lib/test/test-helper.hpp"#include "lib/meta/typelist.hpp"#include "lib/meta/generator.hpp"#include "lib/format-string.hpp"#include "lib/format-cout.hpp"#include "lib/meta/util.hpp"Namespaces | |
| namespace | lib |
| Implementation namespace for support and library code. | |
| namespace | lib::meta |
| namespace | lib::meta::test |
| namespace | lib::meta::test::anonymous_namespace{typelist-diagnostics.hpp} |
Macros | |
| #define | DISPLAY(_IT_) cout << STRINGIFY(_IT_) << "\t:" << showType<_IT_>() << endl; |
| #define | DUMPVAL(_IT_) cout << STRINGIFY(_IT_) << "\t:" << util::toString(_IT_) << endl; |
| #define | EXPECT(_TY_, RENDERED_STRUCTURE) CHECK (showType<_TY_>() == RENDERED_STRUCTURE ## _expect) |
Classes | |
| struct | Numz |
| dummy interface / baseclass for diagnostics More... | |
| struct | Num< I > |
| constant-wrapper type for debugging purposes, usable for generating lists of distinguishable types More... | |
| struct | CountDown< X > |
| helper for generating test lists More... | |
| struct | CountDown< Num< 0 > > |
| struct | CountDown< Num< I > > |
| struct | NullP |
| struct | Printer< T, BASE > |
| debugging template, printing the "number" used for instantiation on ctor call More... | |
| struct | Printer< Nil, BASE > |
| struct | Printer< Num< I >, BASE > |
| < display the presence of a Num instance in the typelist More... | |
| struct | Printer< Flag< Fl >, BASE > |
| < display the presence of a Flag in the typelist More... | |
| struct | Printer< int, BASE > |
| < display the presence of a plain int in the typelist More... | |
| struct | Printer< Node< TY, TYPES >, BASE > |
| Specialisation for debug-printing of a nested sublist. More... | |
| struct | Printer< Config< f1, f2, f3, f4, f5 >, BASE > |
Functions | |
| template<class LIST > | |
| string | printSublist () |
| call the debug-print for a typelist utilising the Printer template | |
| template<typename TYPES > | |
| enable_if< is_Typelist< TYPES >, string > | showType () |
| #define DISPLAY | ( | _IT_ | ) | cout << STRINGIFY(_IT_) << "\t:" << showType<_IT_>() << endl; |
Definition at line 199 of file typelist-diagnostics.hpp.
| #define DUMPVAL | ( | _IT_ | ) | cout << STRINGIFY(_IT_) << "\t:" << util::toString(_IT_) << endl; |
Definition at line 202 of file typelist-diagnostics.hpp.
| #define EXPECT | ( | _TY_, | |
| RENDERED_STRUCTURE | |||
| ) | CHECK (showType<_TY_>() == RENDERED_STRUCTURE ## _expect) |
Definition at line 205 of file typelist-diagnostics.hpp.
| struct lib::meta::CountDown |
| struct lib::meta::CountDown< Num< 0 > > |