Nested-template member function does not compile

Kriang Lerdsuwanakij
Sat Sep 16 20:07:00 GMT 2000

> [~/tmp][4034] >gcc -DMAYBEABUG try3.C
> try3.C: In method `S<double,C>::S(C<double> &, N<double> &)':
> try3.C:60:   instantiated from here
> try3.C:50: `CT' is not a template
> try3.C:50: no matching function for call to `N<double>::f (C<double>
> In the above, CT is a nested template. When MAYBEABUG is not defined,
> regular template is employed instead, which compiles perfectly. Is the

> nested case not allowed by the standard? Have I made a silly mistake?
> is this an actual bug?

Thanks for the report.  It's a bug in gcc 2.95.2.  This has been fixed
in the CVS.


More information about the Gcc-bugs mailing list