My r16-479 adjustment to the PR99599 workaround broke on a class with a
varargs constructor.
It also occurred to me that we don't need to do non-dep conversion checking
in two phases when concepts aren't supported.
PR c++/99599
PR c++/120185
gcc/cp/ChangeLog:
* class.cc (type_has_converting_constructor): Handle null parm.
* pt.cc (fn_type_unification): Skip early non-dep checking if
no concepts.
gcc/testsuite/ChangeLog:
* g++.dg/cpp2a/concepts-nondep6.C: New test.
{
tree fn = *iter;
tree parm = FUNCTION_FIRST_USER_PARMTYPE (fn);
+ if (parm == NULL_TREE)
+ /* Varargs. */
+ return true;
if (parm == void_list_node
|| !sufficient_parms_p (TREE_CHAIN (parm)))
/* Can't accept a single argument, so won't be considered for
conversions that we know are not going to induce template instantiation
(PR99599). */
if (strict == DEDUCE_CALL
- && incomplete
+ && incomplete && flag_concepts
&& check_non_deducible_conversions (parms, args, nargs, fn, strict, flags,
convs, explain_p,
/*noninst_only_p=*/true))
--- /dev/null
+// PR c++/120185
+
+struct A {
+ A(...);
+};
+
+template <class T> void f(A, T) { }
+
+int main()
+{
+ f(42, 24);
+}