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

template<class T, bool V> constexpr bool always_true = true;

template<class T, bool V> concept C = always_true<T, V>;

template<bool V, template<class T> requires C<T, V> class TT>
void f();

template<class T> requires C<T, true>
struct A;

int main() {
  f<true, A>();
  f<false, A>(); // { dg-error "no match|constraint mismatch" }
}