This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: template specializiation
Perhaps this should be filed as a bug on GCC since this should error
as Comeau does.
corey
On 7/7/05, Thomas Neumann <tneumann@users.sourceforge.net> wrote:
> Hi,
>
> > Would this not work for you?
> >
>
> > template<> const A B<d>::b;
> > template<> const A B<c>::b;
> >
> > template<> const A B<c>::b = { &B<d>::b };
> > template<> const A B<d>::b = { &B<c>::b };
>
> hmm, perhaps it _should_ work :) Gcc and Comeau accept it, but Microsoft
> and Borland complain about multiple definitions of B<d>::b and B<c>::d.
> Perhaps I see compiler bugs here, but I would think that they are right.
> Any pointers to the standard?
>
> Thomas
>