* call.c (convert_for_arg_passing): Only give warnings with tf_warning.
* typeck.c (convert_for_assignment): Likewise.
+ PR c++/88631 - CTAD failing for value-initialization.
+ * typeck2.c (build_functional_cast): Try deducing the template
+ arguments even if there are no arguments to deduce from.
+
2019-01-01 Jakub Jelinek <jakub@redhat.com>
Update copyright years.
}
else if (!parms)
{
- if (complain & tf_error)
- error ("cannot deduce template arguments for %qT from ()", anode);
- return error_mark_node;
+ /* Even if there are no parameters, we might be able to deduce from
+ default template arguments. Pass TF_NONE so that we don't
+ generate redundant diagnostics. */
+ type = do_auto_deduction (type, parms, anode, tf_none,
+ adc_variable_type);
+ if (type == error_mark_node)
+ {
+ if (complain & tf_error)
+ error ("cannot deduce template arguments for %qT from ()",
+ anode);
+ return error_mark_node;
+ }
}
else
type = do_auto_deduction (type, parms, anode, complain,
PR c++/88612 - ICE with -Waddress-of-packed-member.
* g++.dg/warn/Waddress-of-packed-member1.C: New test.
+ PR c++/88631 - CTAD failing for value-initialization.
+ * g++.dg/cpp1z/class-deduction59.C: New test.
+
2019-01-02 Martin Sebor <msebor@redhat.com>
Jeff Law <law@redhat.com>