Named return values in C++ doesn't work ?

Alexandre Oliva
Tue Sep 29 16:59:00 GMT 1998

Sylvain Pion <> writes:

> class C {
>   C operator+(const C & d) return tmp; {

For some reason, it only works for functions defined outside a class

Anyway, this feature should be deprecated, since the C++ Standard
explicitly allows the unnamed return value optimization.

Alexandre Oliva
Universidade Estadual de Campinas, SP, Brasil

More information about the Gcc mailing list