Named return values in C++ doesn't work ?
Gabriel Dos Reis
Gabriel.Dos-Reis@dptmaths.ens-cachan.fr
Wed Sep 30 05:15:00 GMT 1998
>>>>> 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
More information about the Gcc
mailing list