This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Named return values in C++ doesn't work ?
- To: egcs at cygnus dot com
- Subject: Named return values in C++ doesn't work ?
- From: Sylvain Pion <Sylvain dot Pion at sophia dot inria dot fr>
- Date: Tue, 29 Sep 1998 11:49:07 +0200
Hi,
This great feature I found in the doc doesn't seem to work (with gcc-2.8.1
nor the latest EGCS snapshot).
I expected something like this to compile:
class C
{
public:
C (const int d = 0)
{ a = d; }
C
operator+(const C & d) return tmp;
{
tmp.a += d.a;
// C tmp (a + d.a);
// return tmp;
}
int a;
};
Do I misunderstand the doc ?
Also, it's a pity (as written in the doc) that we can't specify the exact
location of the constructor. Is someone working on implementing such a
feature ?
--
Sylvain