This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Named return values in C++ doesn't work ?
- To: Alexandre Oliva <oliva at dcc dot unicamp dot br>
- Subject: Re: Named return values in C++ doesn't work ?
- From: Gabriel Dos Reis <Gabriel dot Dos-Reis at dptmaths dot ens-cachan dot fr>
- Date: Wed, 30 Sep 1998 14:05:42 +0200 (MET DST)
- Cc: Sylvain Pion <Sylvain dot Pion at sophia dot inria dot fr>, egcs at cygnus dot com
- References: <19980929114907.M4212@rigel.inria.fr><oremsu1yz1.fsf@araguaia.dcc.unicamp.br>
>>>>> Alexandre Oliva <oliva@dcc.unicamp.br> écrit :
> Sylvain Pion <Sylvain.Pion@sophia.inria.fr> writes:
>> class C {
> [...]
>> C operator+(const C & d) return tmp; {
> For some reason, it only works for functions defined outside a class
> body.
> Anyway, this feature should be deprecated, since the C++ Standard
> explicitly allows the unnamed return value optimization.
I agree. Is anyone be considering that optimization?
-- Gaby