https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106223

--- Comment #4 from Nimrod <nimrodcowboy at gmail dot com> ---
Ok, that somehow makes sense to me. I agree with the forwarding part, as a
normal case, is doing nothing and keep the type.
But I don't find any wordings about "value" or "internal state" in terms of
"(perfect) forwarding", I believe it's only about the types? (If so, the
example does conforms it.) 



https://timsong-cpp.github.io/cppwp/n4659/forward#1
The standard states std::forward as a helper function to simplify forwarding.
"The library provides templated helper functions to simplify applying move
semantics to an lvalue and to simplify the implementation of forwarding
functions. All functions specified in this subclause are signal-safe
([csignal.syn])."

https://timsong-cpp.github.io/cppwp/n4659/func.require#3
"...A forwarding call wrapper is a call wrapper that can be called with an
arbitrary argument list and delivers the arguments to the wrapped callable
object as references. This forwarding step shall ensure that rvalue arguments
are delivered as rvalue references and lvalue arguments are delivered as lvalue
references...."

https://timsong-cpp.github.io/cppwp/n4659/temp.deduct.call#3
"A forwarding reference is an rvalue reference to a cv-unqualified template
parameter that does not represent a template parameter of a class template
(during class template argument deduction). If P is a forwarding reference and
the argument is an lvalue, the type “lvalue reference to A” is used in place of
A for type deduction."

Reply via email to