This is the mail archive of the gcc@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: Named return values in C++ doesn't work ?


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.

-- 
Alexandre Oliva
mailto:oliva@dcc.unicamp.br mailto:aoliva@acm.org
http://www.dcc.unicamp.br/~oliva
Universidade Estadual de Campinas, SP, Brasil



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