Debian Codegraph @

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

raw
1 // PR c++/111485
2 // { dg-do compile { target c++20 } }
3
4 template<class T, bool V> constexpr bool always_true = true;
5
6 template<class T, bool V> concept C = always_true<T, V>;
7
8 template<bool V, template<class T> requires C<T, V> class TT>
9 void f();
10
11 template<class T> requires C<T, true>
12 struct A;
13
14 int main() {
15 f<true, A>();
16 f<false, A>(); // { dg-error "no match|constraint mismatch" }
17 }