This is the mail archive of the
mailing list for the GCC project.
Re: Templates + Inheritance problem
On Thu, 19 Jul 2007 23:38:50 +0800, Ling-hua Tseng wrote
> It's not a bug.
> When you are using class template, the `total template
> specialization' may be wrote by someone. Since the C++ compiler
> expect anything, you should to use one of the following 3 solutions:
^^^^^^^^^^^^^^^ cannot expect anything
It's a typo.
> 1. use `this->Baz()' instead of `Baz()'.
> 2. write `using Foo<KEY>::Baz();' in the derived class template.
> 3. use `Foo<KEY>::Baz()' instead of `Baz()'.
> It's described in item 43 of this book `Effective C++ 3/e'.
> (Its title is "Know how to access names in templatized base classes".)