------- Comment #4 from bangerth at gmail dot com 2010-02-22 04:29 ------- (In reply to comment #3) > But doesn't this error happens during instantiation as the error message > indicates? If definition of Node::FooNode is commented out, the templates > themselves are accepted.
What I meant to say is this: during parsing, it doesn't see Node::test as a member of the base class, but it sees it as a member of the enclosing class in the same way as S::I::f() in struct S { int i; struct I { int f() { return i; } }; } would see S::i -- since they are both members of the same enclosing class S. I.e., Node::FooOpNode::f() sees Node::test() as a sibling, not a member of the base class, and so the call is registered as a function call, not a call of a member function with this as argument. W. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43135