15 static char get() {
return 'A'; }
18 struct __B__ :
public __A__ {
19 static char get() {
return 'B'; }
22 struct __C__ :
public __A__ {
23 static char get() {
return 'C'; }
26 struct __D__ :
public __A__ {
27 static char get() {
return 'D'; }
38 int main(
int argc,
char **argv)
46 JParser<> zap(
"Example program to test selection of base class.");
52 catch(
const exception &error) {
53 FATAL(error.what() << endl);
58 typedef JTYPELIST<__A__,
61 __D__>::typelist typelistABCD;
63 typedef JTYPELIST<__B__,
66 __D__>::typelist typelistBACD;
68 typedef JTYPELIST<__B__,
71 __D__>::typelist typelistBCAD;
73 typedef JTYPELIST<__B__,
76 __A__>::typelist typelistBCDA;
78 DEBUG(
"A,B,C,D <- A? " << (JBaseType_t<__A__, typelistABCD>::is_base) << endl);
79 DEBUG(
"A,B,C,D <- B? " << (JBaseType_t<__B__, typelistABCD>::is_base) << endl);