template bug ?

Alexandre Oliva oliva@dcc.unicamp.br
Thu Dec 3 19:24:00 GMT 1998


On Dec  3, 1998, Mark Mitchell <mark@markmitchell.com> wrote:

>>>>>> "Alexandre" == Alexandre Oliva <oliva@dcc.unicamp.br> writes:

Alexandre> Unlike you, I couldn't find any such restriction in the
Alexandre> grammar, and I even found an example of an explicit
Alexandre> specialization within a class body in the Standard
Alexandre> [temp.class.spec.mfunc]/2, so I have changed my mind,
Alexandre> and I hope you do too.

> The only one of these that comes close to allowing a specialization is
> template-declaration, but:

>     template-declaration:
>       exportopt template < template-parameter-list > declaration

> and here the temlpate-parameter-list may not be empty

I see your point, and I agreed with you until I found an example of
this use in the Standard.  IMO, even though the grammar does not allow
this use, we'd better support it, maybe printing a warning, otherwise
people will point at the snippet from the Standard and say egcs can't
do template specialization.

Maybe Jason can get authoritative information from the Committee: did
they really intend to allow this use or was the snippet included in
the Standard by mistake?

-- 
Alexandre Oliva  http://www.dcc.unicamp.br/~oliva  aoliva@{acm.org}
oliva@{dcc.unicamp.br,gnu.org,egcs.cygnus.com,samba.org}
Universidade Estadual de Campinas, SP, Brasil




More information about the Gcc-bugs mailing list