61 string talk() {
return "__"+name+
"__"; }
76 virtual void eat (X& x) = 0;
81 template<
class X,
class BASE>
86 DoIt () { cout <<
"ctor DoIt<"<<
X::name <<
" >\n";}
87 virtual ~
DoIt() { cout <<
"dtor DoIt<"<<
X::name <<
" >\n";}
89 void eat (X& x) { cout <<
"devouring" << x.talk() <<
"\n";}
106 void eat() { cout <<
"gulp!\n"; }
123 NumberBabbler me_can_has_more_numberz;
125 CHECK (
INSTANCEOF (TheInterface, &me_can_has_more_numberz));
127 TheTypes::Tail::Head b2;
128 TheTypes::Tail::Tail::Tail::Head b5;
129 TheTypes::Tail::Tail::Tail::Tail::Tail::Head b13;
131 me_can_has_more_numberz.eat (b2);
132 me_can_has_more_numberz.eat (b5);
136 subInterface.eat (b13);
137 me_can_has_more_numberz.eat();
139 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.
Simple test class runner.