☰
Debian Codegraph
@
15:15.3.rel1-2
15:15.3.rel1-1
/
/
gcc
/
testsuite
/
g++.dg
/
cpp2a
/
consteval35.C
☽
☼
gcc/testsuite/g++.dg/cpp2a/consteval35.C
code
plain
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