gcc/testsuite/g++.dg/cpp2a/concepts-complete4.C
raw| 1 | // PR c++/109752 |
| 2 | // { dg-do compile { target c++20 } } |
| 3 | |
| 4 | template<class T> |
| 5 | concept C = requires { sizeof(T); } && T::value; // { dg-error "changed from" } |
| 6 | |
| 7 | struct A; |
| 8 | |
| 9 | static_assert(!C<A>); |
| 10 | |
| 11 | struct A { static constexpr bool value = false; }; |
| 12 | |
| 13 | static_assert(C<A>); // { dg-error "assert" } |