aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/cpp2a/concepts-traits5.C
blob: de99dcd13c89cc558cb7fd2d3211752e5cf8f355 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
// PR c++/121859
// { dg-do compile { target c++20 } }

template <typename T>
struct S {
  template <typename U>
  static constexpr bool foo = sizeof(T) == sizeof(U);
};

template <typename U> void bar(U x) requires S<char>::foo<U> {}

int main() {
  bar(double{});  // { dg-error "no matching function" }
}