This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: Incorrect (?) template specialization results when compiling with -O3
Yeah, this is how I've rewritten it and now it's working as I expect. It
even works in Borland (amazingly).
Sometimes I think that every feature of C++ is somehow surprising when
you first try to use it. Ah well, that's why I get paid!
Thanks again,
Adam
On Fri, 10 Jul 2009 10:20 -0400, "John Fine" <johnsfine@verizon.net>
wrote:
> Or distribute the declarations the opposite way to create the opposite
> (but more easily non circular) dependency:
>
> Put the line
> template<> const char* getstring<foo::bar>();
>
> In the header that defines foo and declares (and maybe defines) bar,
> rather than in a header dedicated to getstring.