c++: generic lambda and function ptr conv [PR105221]
commit85131af0603c0af2aa6b40de6cc929905f22bd50
authorJason Merrill <jason@redhat.com>
Thu, 30 Mar 2023 15:07:17 +0000 (30 11:07 -0400)
committerJason Merrill <jason@redhat.com>
Thu, 30 Mar 2023 22:25:04 +0000 (30 18:25 -0400)
treeb4a74b14b933f1008cd0cbfb0cf6f6f8dda2d2f8
parent83d2b1ccd17d394d546a38562815ef83daa05e85
c++: generic lambda and function ptr conv [PR105221]

We weren't properly considering the function pointer conversions in
deduction between FUNCTION_TYPE; we just hardcoded the
UNIFY_ALLOW_MORE_CV_QUAL semantics, which are backwards when deducing for a
template conversion function like the one in a generic lambda.  And when I
started checking the ALLOW flags, I needed to make sure they stay set to
avoid breaking trailing13.C.

PR c++/105221

gcc/cp/ChangeLog:

* pt.cc (unify) [FUNCTION_TYPE]: Handle function pointer
conversions.

gcc/testsuite/ChangeLog:

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