aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/cpp2a/consteval35.C
blob: 59d23ac482b18ca10271d5ffcaef50788927d74b (plain)
1
2
3
4
5
6
7
8
9
10
// { dg-do compile { target c++20 } }

template <typename T, typename F>
constexpr bool is_not(T t, F f) {
     return not f(t);
}

consteval bool is_even(int i) { return i % 2 == 0; }

static_assert(is_not(5, is_even)); // ok