97 static constexpr void init(
Pred&,
Tree const&)
noexcept
101 template <
class Value>
102 [[nodiscard]]
static constexpr bool returnableValue(
Pred const& p,
103 Value
const& v)
noexcept
105 if constexpr (std::is_invocable_r_v<bool, ReturnFun, Value const&>) {
106 if constexpr (Negated) {
107 return !std::invoke_r<bool>(p.ret_fun, v);
109 return std::invoke_r<bool>(p.ret_fun, v);
116 template <
class Tree>
117 [[nodiscard]]
static constexpr bool returnable(
Pred const& p,
Tree const& t,
120 if constexpr (std::is_invocable_r_v<bool, ReturnFun,
Tree const&,
122 if constexpr (Negated) {
123 return !std::invoke_r<bool>(p.ret_fun, t, n);
125 return std::invoke_r<bool>(p.ret_fun, t, n);
132 template <
class Tree>
133 [[nodiscard]]
static constexpr bool traversable(
Pred const& p,
Tree const& t,
136 if constexpr (std::is_invocable_r_v<bool, TraverseFun,
Tree const&,
138 if constexpr (Negated) {
139 return !std::invoke_r<bool>(p.trav_fun, t, n);
141 return std::invoke_r<bool>(p.trav_fun, t, n);
148 template <
class Tree>
149 [[nodiscard]]
static constexpr bool returnableRay(
Pred const& p,
Tree const& t,
153 return returnable(p, t, n);
156 template <
class Tree>
157 [[nodiscard]]
static constexpr bool traversableRay(
Pred const& p,
Tree const& t,
161 return traversable(p, t, n);