Boost logo

Boost :

Subject: Re: [boost] [interprocess] Compile problem with 1.39 and trunk
From: Thomas Klimpel (Thomas.Klimpel_at_[hidden])
Date: 2009-08-30 13:39:22


Mathias Gaunard wrote:
> Thomas Klimpel wrote:
> > The article explains "copy elision" and RVO, and hence explains why taking argument by value is closely related to rvalue-ness.
> Saying that perfect forwarding doesn't work because the compiler can't
> do an optional copy elision anymore when you forward a value seems a bit
> far-fatched, especially since the pattern where you can exploit it is
> quite specific. (I've never found a reason to pass arguments by value
> outside of the assignment operator)

While reviewing the polygon library in a debugger, I found myself stepping through copy-constructors of various iterator types quite often. So I remembered your claim "I've never found a reason to pass arguments by value outside of the assignment operator", because there are obviously good reasons to pass iterators by value.

Regards,
Thomas


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