PR c++/59296
* call.c (add_function_candidate): Also set LOOKUP_NO_TEMP_BIND.
From-SVN: r211821
+2014-06-19 Jason Merrill <jason@redhat.com>
+
+ PR c++/59296
+ * call.c (add_function_candidate): Also set LOOKUP_NO_TEMP_BIND.
+
2014-06-18 Jason Merrill <jason@redhat.com>
PR c++/59296
bool rv = FUNCTION_RVALUE_QUALIFIED (TREE_TYPE (fn));
parmtype = cp_build_reference_type (parmtype, rv);
/* Don't bind an rvalue to a const lvalue ref-qualifier. */
- lflags |= LOOKUP_NO_RVAL_BIND;
+ if (!rv)
+ lflags |= LOOKUP_NO_RVAL_BIND|LOOKUP_NO_TEMP_BIND;
}
else
{