This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Problem with an overloaded cast operator
- To: Ryszard Kabatek <rumcajs at gmx dot net>
- Subject: Re: Problem with an overloaded cast operator
- From: Alexandre Oliva <aoliva at cygnus dot com>
- Date: 03 Apr 2000 06:58:16 -0300
- Cc: gcc at gcc dot gnu dot org
- Organization: Cygnus Solutions, a Red Hat Company
- References: <23537.954746136@www18.gmx.net>
On Apr 3, 2000, Ryszard Kabatek <rumcajs@gmx.net> wrote:
> I wolud expect, the sample below should not compile (g++ -Wall),
> because the function f() returns X by value and the copying of X
> is forbidden.
But `f' is a friend of `X', so it can access the private
copy-constructor.
--
Alexandre Oliva Enjoy Guaranį, see http://www.ic.unicamp.br/~oliva/
Cygnus Solutions, a Red Hat company aoliva@{redhat, cygnus}.com
Free Software Developer and Evangelist CS PhD student at IC-Unicamp
oliva@{lsd.ic.unicamp.br, gnu.org} Write to mailing lists, not to me