Simple template bug egcs1.1.1

Alexandre Oliva
Mon Jan 25 08:01:00 GMT 1999

On Jan 25, 1999, <> wrote:

> template<class A, class B>
> A sqr(A x) { return x * x; }

> There is a simple mistake, it should say
> template<class A>

> but logically if B is not used it should be ignored, I think.

Nope.  If it cannot be deduced, it must be explicitly specified.  egcs 
is correct.

Alexandre Oliva  aoliva@{}
Universidade Estadual de Campinas, SP, Brasil

More information about the Gcc-bugs mailing list