c++: deducing only from noexcept-spec [PR80951]
authorPatrick Palka <ppalka@redhat.com>
Tue, 8 Feb 2022 14:11:31 +0000 (09:11 -0500)
committerPatrick Palka <ppalka@redhat.com>
Tue, 8 Feb 2022 14:11:31 +0000 (09:11 -0500)
commit676e987b850a7352ece750a8f3a1ac5dae6b3627
treeffd4eb991964d6edbab7242bd62edd23cbeee7c2
parent7ff201d85fad11ba6365a5612124b75b385a97bd
c++: deducing only from noexcept-spec [PR80951]

The "fail-fast" predicate uses_deducible_template_parms used by
unify_one_argument is neglecting to look inside the noexcept-spec of a
function type.  This causes deduction to spuriously fail whenever the
noexcept-spec is the only part of the type which contains a deducible
template parameter.

PR c++/80951

gcc/cp/ChangeLog:

* pt.cc (uses_deducible_template_parms): Consider the
noexcept-spec of a function type.

gcc/testsuite/ChangeLog:

* g++.dg/cpp1z/noexcept-type25.C: New test.
gcc/cp/pt.cc
gcc/testsuite/g++.dg/cpp1z/noexcept-type25.C [new file with mode: 0644]