Debian Codegraph @

gcc/testsuite/g++.dg/cpp2a/consteval35.C

raw
1 // { dg-do compile { target c++20 } }
2
3 template <typename T, typename F>
4 constexpr bool is_not(T t, F f) {
5 return not f(t);
6 }
7
8 consteval bool is_even(int i) { return i % 2 == 0; }
9
10 static_assert(is_not(5, is_even)); // ok