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: Sylvain Pion <Sylvain dot Pion at sophia dot inria dot fr>
- Subject: Re: Named return values in C++ doesn't work ?
- From: Alexandre Oliva <oliva at dcc dot unicamp dot br>
- Date: 29 Sep 1998 16:49:06 -300
- Cc: egcs at cygnus dot com
- References: <19980929114907.M4212@rigel.inria.fr>
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