42#ifndef UFO_CONTAINER_TREE_PREDICATE_IF_THEN_HPP
43#define UFO_CONTAINER_TREE_PREDICATE_IF_THEN_HPP
46#include <ufo/container/tree/predicate/filter.hpp>
47#include <ufo/utility/type_traits.hpp>
54template <Filterable PredPre, Filterable PredPost>
56 IfThen(PredPre
const& pre, PredPost
const& post) noexcept : pre(pre), post(post) {}
62template <Filterable PredPre, Filterable PredPost>
64 std::remove_cvref_t<PredPost>>
65operator>>(PredPre&& pre, PredPost&& post)
noexcept
67 return IfThen(std::forward<PredPre>(pre), std::forward<PredPost>(post));
70template <Filterable PredPre, Filterable PredPost>
75 static constexpr void init(
Pred& p,
Tree const& t)
noexcept
81 template <
class Value>
82 [[nodiscard]]
static constexpr bool returnableValue(
Pred const& p,
83 Value
const& v)
noexcept
90 [[nodiscard]]
static constexpr bool returnable(
Pred const& p,
Tree const& t,
98 [[nodiscard]]
static constexpr bool traversable(
Pred const&,
Tree const&,
106 template <
class Tree>
107 [[nodiscard]]
static constexpr bool returnableRay(
Pred const& p,
Tree const& t,
115 template <
class Tree>
116 [[nodiscard]]
static constexpr bool traversableRay(
Pred const&,
Tree const&,
128template <
class T,
class L,
class R>
130 : std::disjunction<contains_pred<T, L>, contains_pred<T, R>> {
133template <
class T,
class L,
class R>
Utilizing curiously recurring template pattern (CRTP)