template specializiation

corey taylor corey.taylor@gmail.com
Thu Jul 7 16:39:00 GMT 2005


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
>



More information about the Gcc-help mailing list