The reason many of these calls fail is because there is syntactic ambiguity that you need to resolve using the single most implicit use of the template keyword. Instead of writing
this->fbase<true>(5);
You need to write
this->template fbase<true>(5);
The reason is that without the template keyword, the compiler parses this as
(((this->fbase) < true) > 5)
It's pointless. The template keyword explicitly removes this ambiguity. Adding the template keyword to the other cases you mentioned should fix these problems.
Actually, I'm not sure why this works for direct base classes, so if someone can answer this part of the question, I would like to see what the answer is.
templatetypedef
source share