Re: templates

2025-06-14 Thread Jonathan Wakely via Gcc
On Sat, 14 Jun 2025 at 13:32, саша савельев wrote: > > > To whom it may concern > > Why we can’t use in this context? > > #include < iostream > > template < auto N > > void f () { > std::cout << N << std::endl ; > } > int main () { > f < 1 >(); > f < '!' >(); > f < "!!" >(); // e

Re: Templates + Inheritance problem

2007-07-19 Thread Ling-hua Tseng
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 exp

Re: Templates + Inheritance problem

2007-07-19 Thread Ling-hua Tseng
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: 1. use `this->Baz()' instead of `Baz()'. 2. write `using Foo::Baz();' in the derived clas