23 Mar
2018
23 Mar
'18
5:05 p.m.
Matt Calabrese wrote:
On Fri, Mar 23, 2018 at 12:01 PM, Peter Dimov via Boost
wrote: Interesting question. value() && returns T&&. The auto const& reference can't bind directly to T&&, because that's not an lvalue.
An lvalue-reference-to-const can bind to an rvalue (it's why you can pass an rvalue to a function that takes a "const T&").
You're right, it does bind directly. http://eel.is/c++draft/dcl.init.ref#5.3.1