This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [g++] make_pair inlining failure?


On Tue, 29 Nov 2011, Robert Jones wrote:

On Mon, Nov 28, 2011 at 2:42 PM, Marc Glisse <marc.glisse@inria.fr> wrote:
The set of circumstances where a compiler is allowed to elide a copy is extremely restrictive.

Really... how restrictive exactly? Would you take issue with anything stated in


http://cpp-next.com/archive/2009/08/want-speed-pass-by-value/

No, that page was carefully written by a knowledgeable person so the examples would fit right into those circumstances. And those examples are basically the only cases where copy elision is allowed. Yes, some of us would like to change that. Note that in C++11, you at least get a move instead of a copy.


--
Marc Glisse


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]