change in templates in gcc-4
Giovanni Bajo
rasky@develer.com
Sat Jun 18 18:44:00 GMT 2005
Davy Durham <pubaddr2@davyandbeth.com> wrote:
> Hey, question.. Just wondering if gcc is supposed to behave this way
now.
> For example, I have a template: [...]
>
> In gcc-3, there was no error until you tried to call f.method2(), but in
> gcc-4 it gives the error when foo<bar> is instantiated whether the
> method is called or not. I used this feature intentionally in gcc-3,
> but I wanted to know if it's an ANSI thing one way or another. And if
> it's not ANSI compliant now, then I guess it needs to be fixed in gcc.
The behaviour of GCC 4 is compliant to the ANSI standard in this regard, so
you will have to fix your code.
For the next time, remember to provide a fully compilable testcase (for copy
& paste), and to clarify what the standard says through other means
(newsgroups as comp.lang.c++.moderated and comp.std.c++, tests with the
Comeau online compiler, etc.) so to report issues which are more likely real
GCC bugs.
Thanks anyway for taking the time of reporting this issue!
--
Giovanni Bajo
More information about the Gcc-bugs
mailing list