[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Copy constructor at return

From: Alan Woodland
Subject: Re: Copy constructor at return
Date: Fri, 22 Sep 2006 11:06:47 +0100
User-agent: Debian Thunderbird 1.0.2 (X11/20060830) wrote:
> Hi,
> Why g++ in Linux does not call copy constructor at return statement?
It's known as return value optimization. See: for more
details. Basically though you can't rely upon any side effects of copy
constructors (which in your case was the output), since compilers aren't
required to make an instance and then copy it.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]