21 Sep
2009
21 Sep
'09
6:19 p.m.
Eric Niebler
The reason is because in the second invocation, the template argument T is deduced to be "B const", and an rvalue can bind to a const lvalue reference. In the first invocation, T is deduced to "B" and an rvalue cannot bind to a non-const lvalue reference.
HTH,
Thanks again, Eric. This is really helpful.