static struct z_candidate *add_function_candidate
(struct z_candidate **, tree, tree, tree, tree, tree, int);
static tree implicit_conversion (tree, tree, tree, int);
-static tree standard_conversion (tree, tree, tree);
+static tree standard_conversion (tree, tree, tree, int);
static tree reference_binding (tree, tree, tree, int);
static tree build_conv (enum tree_code, tree, tree);
static bool is_subseq (tree, tree);
also pass the expression EXPR to convert from. */
static tree
-standard_conversion (tree to, tree from, tree expr)
+standard_conversion (tree to, tree from, tree expr, int flags)
{
enum tree_code fcode, tcode;
tree conv;
the standard conversion sequence to perform componentwise
conversion. */
tree part_conv = standard_conversion
- (TREE_TYPE (to), TREE_TYPE (from), NULL_TREE);
+ (TREE_TYPE (to), TREE_TYPE (from), NULL_TREE, flags);
if (part_conv)
{
&& ((*targetm.vector_opaque_p) (from)
|| (*targetm.vector_opaque_p) (to)))
return build_conv (STD_CONV, to, conv);
- else if (IS_AGGR_TYPE (to) && IS_AGGR_TYPE (from)
+ else if (!(flags & LOOKUP_CONSTRUCTOR_CALLABLE)
+ && IS_AGGR_TYPE (to) && IS_AGGR_TYPE (from)
&& is_properly_derived_from (from, to))
{
if (TREE_CODE (conv) == RVALUE_CONV)
if (TREE_CODE (to) == REFERENCE_TYPE)
conv = reference_binding (to, from, expr, flags);
else
- conv = standard_conversion (to, from, expr);
+ conv = standard_conversion (to, from, expr, flags);
if (conv)
return conv;
build_tree_list (NULL_TREE, expr),
TYPE_BINFO (type),
LOOKUP_NORMAL | LOOKUP_ONLYCONVERTING
+ | LOOKUP_NO_CONVERSION
| LOOKUP_CONSTRUCTOR_CALLABLE);
}