
On Wed, Aug 26, 2009 at 11:09 AM, Mathias Gaunard<mathias.gaunard@ens-lyon.org> 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)
So it shows why the statement "..., but since C++03 can't officially detect rvalue-ness anyway that's irrelevant" is not the complete truth.
Notice the "officially" in the sentence.
Actually Boost.Fusion states how you can use it to create the pseudo-perfect forwarding that the exponential number of overloads supplies, but without creating the exponential number of overloads, I have used that method for my RPC system, works excellently. Boost.Fusion is great!