Debian Codegraph @

gcc/testsuite/g++.dg/cpp2a/concepts-fn9.C

raw
1 // PR c++/80637
2 // { dg-do compile { target c++20 } }
3
4 template<class T, class U>
5 concept same_as = __is_same(T, U);
6
7 template<class T>
8 struct A {
9 void f(int) requires same_as<T, int>;
10 void f(...) requires (!same_as<T, int>);
11 };
12
13 auto fptr = &A<int>::f;
14 using type = decltype(fptr);
15 using type = void (A<int>::*)(int);