+2015-07-10 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/54521
+ * call.c (convert_like_real): Do not set LOOKUP_ONLYCONVERTING for
+ the second step of copy-initialization.
+
2015-07-10 Jason Merrill <jason@redhat.com>
* pt.c (find_parameter_packs_r): Handle variable templates.
/* Copy-initialization where the cv-unqualified version of the source
type is the same class as, or a derived class of, the class of the
destination [is treated as direct-initialization]. [dcl.init] */
- flags = LOOKUP_NORMAL|LOOKUP_ONLYCONVERTING;
+ flags = LOOKUP_NORMAL;
if (convs->user_conv_p)
/* This conversion is being done in the context of a user-defined
conversion (i.e. the second step of copy-initialization), so
don't allow any more. */
flags |= LOOKUP_NO_CONVERSION;
+ else
+ flags |= LOOKUP_ONLYCONVERTING;
if (convs->rvaluedness_matches_p)
flags |= LOOKUP_PREFER_RVALUE;
if (TREE_CODE (expr) == TARGET_EXPR