This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: template mem fun problem gcc-3.0.2
- From: Paolo Carlini <pcarlini at unitus dot it>
- To: "Neal D. Becker" <nbecker at fred dot net>
- Cc: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 01 Feb 2002 19:37:49 +0100
- Subject: Re: template mem fun problem gcc-3.0.2
- References: <3C5AD5DF.7A6126EA@unitus.it> <x88lmed83cs.fsf@rpppc1.md.hns.com>
"Neal D. Becker" wrote:
> I may be mistaken, but I thought that the for a template function
//
> X x = c.f<X> (w)
>
> Is this not correct? If it is correct, isn't my code correct and
> should not give any error?
Yes, it is perfectly correct... but in the code posted you forgot to put the
equal sign in between "x" and "c.f<X> (w)", that is:
double y iir.Compute<double> (x);
vs
double y = iir.Compute<double> (x);
:-)
Cheers,
Paolo