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: wrong operator=() taken


On Aug 24, 1999, "Marc Winter (HiWi)" <marcw@nick-5.neuro.informatik.uni-kassel.de> wrote:

> 	A::operator=

> I think the output should have been:
	
> 	C::operator=

Nope.  An `operator=(const C&)' is implicitly generated for C<T>, and
it is preferred over `operator=(const A<T>&)' in overload resolution.
It calls B's `operator=(const B&)', also implicitly defined, and this
one calls A's `operator=(const A&)'.

-- 
Alexandre Oliva http://www.dcc.unicamp.br/~oliva IC-Unicamp, Bra[sz]il
oliva@{dcc.unicamp.br,guarana.{org,com}} aoliva@{acm.org,computer.org}
oliva@{gnu.org,kaffe.org,{egcs,sourceware}.cygnus.com,samba.org}
** I may forward mail about projects to mailing lists; please use them


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