Boost logo

Boost :

Subject: Re: [boost] [Boost.Move] A few notes
From: Thomas Klimpel (Thomas.Klimpel_at_[hidden])
Date: 2012-01-12 10:13:51

Dan Ivy wrote:
> "Constructor Forwarding" (see
> <>
> ). So the purpose of "boost::forward" is not to emulate
> "std::forward" for more general use cases.
> I don't see it. How is "constructor forwarding" any different than
> "more general forwarding" in that respect, or, in any other respect?

Well, the above documentation says "Fortunately, most constructors take arguments by value, by const-reference or by rvalue reference. If these limitations are accepted, ...".

Because perfect emulation of "std::forward" is not possible, the above reasoning allows to exclude the case of "non-const reference" arguments. For an arbitrary function, excluding the case of "non-const reference" arguments would be a total no-go.


Boost list run by bdawes at, gregod at, cpdaniel at, john at