aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/cpp2a/concepts-fn9.C
blob: eb2963afcc96a4add61bfcc91fae52927449c26e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
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);