c++: PMF template parm and noexcept [PR90664]
authorJason Merrill <jason@redhat.com>
Fri, 2 Apr 2021 21:07:12 +0000 (17:07 -0400)
committerJason Merrill <jason@redhat.com>
Sat, 3 Apr 2021 05:54:03 +0000 (01:54 -0400)
commit7c3ba2145ceddb0fd7f85fbf27f8db81896527d1
treef6c3d402642234abfc995eac5aa0e229dc4709dc
parent23be03a0f243a084a0fe03d0b96a3d045e1a2b65
c++: PMF template parm and noexcept [PR90664]

The constexpr code only wants to preserve PTRMEM_CST in conversions if the
conversions are only qualification conversions; dropping noexcept counts as
a qualification adjustment in overload resolution, so let's include it here.

gcc/cp/ChangeLog:

PR c++/90664
* cvt.c (can_convert_qual): Check fnptr_conv_p.

gcc/testsuite/ChangeLog:

PR c++/90664
* g++.dg/cpp1z/noexcept-type24.C: New test.
gcc/cp/cvt.c
gcc/testsuite/g++.dg/cpp1z/noexcept-type24.C [new file with mode: 0644]