This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: member-template bug in egcs


Michael A Benzinger writes:

> At 02:18 AM 11/21/97 -0200, Alexandre Oliva wrote:

>> a specialization of a template class does not implicitly
>> gain priviledged access to another specialization of the same template
>> class.

> "A class or a class template can have members that are themselves templates.

Ok, but what gives complex<T1>::complex(const complex<T2>& c)
priviledged access to complex<T2>, so that it can read c.re and c.im?
I don't think this would be valid.

> You can also consult Scott Meyers' "Effective C++, Second Edition"
> for more information on this.

IMO, the issue is unrelated to whether the constructor is a template
constructor or not.  Neither a template constructor nor a non-template
constructor would have priviledged access to a specialization of the
template class that is not the one it is member of.

-- 
Alexandre Oliva
mailto:oliva@dcc.unicamp.br mailto:aoliva@acm.org
http://www.dcc.unicamp.br/~oliva
Universidade Estadual de Campinas, SP, Brasil


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]