
On Thu, Jan 12, 2012 at 5:13 PM, Thomas Klimpel <Thomas.Klimpel@synopsys.com> wrote:
Dan Ivy wrote:
"Constructor Forwarding" (see <http://www.boost.org/doc/libs/1_48_0/doc/html/move/construct_forwarding.html> ). 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.
Regards, Thomas
_______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
Ok, I see."Constructor" forwarding in constrast to "perfect" forwarding. So "constructor" is an ajective describing the ""quality"" of forwarding and not the kind of forwarding. This wasn't immediatly obvious. FWIW I think it's a confusing term.