wrong operator=() taken

Alexandre Oliva oliva@dcc.unicamp.br
Tue Aug 31 22:45:00 GMT 1999


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



More information about the Gcc-bugs mailing list