Fixed by r15-4340-gcacbb4daac3e9a.

        PR c++/80637

gcc/testsuite/ChangeLog:

        * g++.dg/cpp2a/concepts-fn9.C: New test.
---
 gcc/testsuite/g++.dg/cpp2a/concepts-fn9.C | 15 +++++++++++++++
 1 file changed, 15 insertions(+)
 create mode 100644 gcc/testsuite/g++.dg/cpp2a/concepts-fn9.C

diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-fn9.C 
b/gcc/testsuite/g++.dg/cpp2a/concepts-fn9.C
new file mode 100644
index 00000000000..eb2963afcc9
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp2a/concepts-fn9.C
@@ -0,0 +1,15 @@
+// PR c++/80637
+// { dg-do compile { target c++20 } }
+
+template<class T, class U>
+concept same_as = __is_same(T, U);
+
+template<class T>
+struct A {
+  void f(int) requires same_as<T, int>;
+  void f(...) requires (!same_as<T, int>);
+};
+
+auto fptr = &A<int>::f;
+using type = decltype(fptr);
+using type = void (A<int>::*)(int);
-- 
2.47.0.72.gef8ce8f3d4

Reply via email to