Templates + Inheritance problem

Ling-hua Tseng uranus@it.muds.net
Thu Jul 19 15:45:00 GMT 2007


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.
Sorry.
>   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".)



More information about the Gcc mailing list