aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/cpp2a/concepts-explicit-inst4.C
blob: 562fc138cfd4a0fde64fb1c7f7dd36517c14fe00 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
// { dg-do compile { target c++20 } }

template<typename T>
  concept C = __is_class(T);

template<typename T>
  concept D = C<T> && __is_empty(T);

template<typename T>
  struct S {
    void g() requires C<T> { } // #1
    void g() requires D<T> { } // #2
  };

template void S<int>::g(); // { dg-error "match" }

int main() { }