[Q] class template ctor, cctor and dtor decls??

Alexandre Oliva oliva@dcc.unicamp.br
Wed Mar 31 23:46:00 GMT 1999


On Mar  8, 1999, gcl++ Library development <m.cvjetko-no-spam@rt.e-technik.uni-erlangen.de> wrote:

>   Wich one declaration of the template class and its ctors and dtor
>   is proper acording to Standard??

Both

>   If the declaration for X<T> is OK, is it a bug if for such dtor decl 
>   compiler reports a syntax error.

Yep, it's fixed in the current development tree, but it will not be
fixed in the upcoming release 1.1.2

>   Secondly, if the decl for X1<T> is OK, how comes it accepts copy ctor
>   (cctor) argument X1& instead of X1<T>& ??

The template class name is a class name within the scope of the
template class, and is equivalent to the full template-id.

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




More information about the Gcc mailing list