This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]