This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: copy ctor not called
- From: Dirk Jagdmann <jagdmann at gmail dot com>
- To: Jeroen Wijnhout <Jeroen dot Wijnhout at kdemail dot net>
- Cc: gcc-help at gcc dot gnu dot org
- Date: Sun, 3 Jul 2005 14:26:58 +0200
- Subject: Re: copy ctor not called
- References: <200507022024.10598.Jeroen.Wijnhout@kdemail.net>
- Reply-to: Dirk Jagdmann <jagdmann at gmail dot com>
The behaviour of gcc is standard compliant, since an assignment in the
same statement as a variable declaration is always treated by the copy
constructor. The mentioned gcc switch
-fno-elide-constructors will work, but on other compilers you'll have
the same behaviour again.
--
---> Dirk Jagdmann
----> http://cubic.org/~doj
-----> http://llg.cubic.org