52 string talk() {
return "__"+name+
"__"; }
67 virtual void eat (X& x) = 0;
72 template<
class X,
class BASE>
77 DoIt () { cout <<
"ctor DoIt<"<<
X::name <<
" >\n";}
78 virtual ~
DoIt() { cout <<
"dtor DoIt<"<<
X::name <<
" >\n";}
80 void eat (X& x) { cout <<
"devouring" << x.talk() <<
"\n";}
97 void eat() { cout <<
"gulp!\n"; }
114 NumberBabbler me_can_has_more_numberz;
116 CHECK (
INSTANCEOF (TheInterface, &me_can_has_more_numberz));
118 TheTypes::Tail::Head b2;
119 TheTypes::Tail::Tail::Tail::Head b5;
120 TheTypes::Tail::Tail::Tail::Tail::Tail::Head b13;
122 me_can_has_more_numberz.eat (b2);
123 me_can_has_more_numberz.eat (b5);
127 subInterface.eat (b13);
128 me_can_has_more_numberz.eat();
130 INFO (
test,
"SizeOf = %zu",
sizeof(me_can_has_more_numberz));
#define INSTANCEOF(CLASS, EXPR)
shortcut for subclass test, intended for assertions only.
Helpers for working with lib::meta::Types (i.e.
A front-end for using printf-style formatting.
Implementation namespace for support and library code.
Simplistic test class runner.