Debian Codegraph @

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

raw
1 // PR c++/97093
2 // { dg-do compile { target c++20 } }
3 // { dg-additional-options "-fconcepts-diagnostics-depth=3" }
4
5 template<class X, X x>
6 concept C = requires {
7 requires (X)x; // { dg-message "false" }
8 };
9
10 template<class X, X x>
11 concept D = requires {
12 requires false || (X)x; // { dg-message "false" }
13 };
14
15 int main() {
16 static_assert(C<bool, 0>); // { dg-error "failed" }
17 static_assert(D<bool, 0>); // { dg-error "failed" }
18 }