Boost logo

Boost :

Subject: Re: [boost] [move] problem with msvc and BOOST_MOVABLE_BUT_NOT_COPYABLE
From: David Abrahams (dave_at_[hidden])
Date: 2010-05-28 13:16:14


At Fri, 28 May 2010 18:29:13 +0200,
Thomas Klimpel wrote:
>
> > > but a simple programmer error in "X X::create()" that would have a
> > > significant performance penalty even if the compiler/linker
> > > would accept the code.
> >
> > There is no implementation of copy ctor in the original example.
> > How compiler/linker could accept the code? What "performance penalty"
> > you are talking about?
>
> I'm talking about the BOOST_COPYABLE_AND_MOVABLE case. Most compilers won't do RVO for code written like "X X::create()".

You are claiming that some aspect of that signature causes RVO not to
happen? What aspect?

-- 
Dave Abrahams           Meet me at BoostCon: http://www.boostcon.com
BoostPro Computing
http://www.boostpro.com

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk