[Bug c++/70610] [6 regression] error: invalid initialization of non-const reference of type
ppalka at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Sun Apr 10 21:27:00 GMT 2016
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70610
--- Comment #1 from Patrick Palka <ppalka at gcc dot gnu.org> ---
The problem is that during template processing we think the operand to the
unary + is an lvalue (because it's wrapped in a NON_DEPENDENT_EXPR node) and so
during overload resolution we select the non-const overload of operator+. Then
during instantiation, since the operand is actually an rvalue we reject the
function call since it requires the operand to be an lvalue.
More information about the Gcc-bugs
mailing list