42#ifndef UFO_CONTAINER_TREE_PREDICATE_XOR_HPP
43#define UFO_CONTAINER_TREE_PREDICATE_XOR_HPP
46#include <ufo/container/tree/predicate/filter.hpp>
47#include <ufo/utility/type_traits.hpp>
55template <Filterable PredLeft, Filterable PredRight>
57 Xor(PredLeft
const& left, PredRight
const& right) noexcept : left(left), right(right) {}
63template <Filterable PredLeft, Filterable PredRight>
65operator^(PredLeft&& left, PredRight&& right)
noexcept
67 return Xor(std::forward<PredLeft>(left), std::forward<PredRight>(right));
70template <Filterable PredLeft, Filterable PredRight>
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& p,
Tree const& t,
109 template <
class Tree>
110 [[nodiscard]]
static constexpr bool returnableRay(
Pred const& p,
Tree const& t,
118 template <
class Tree>
119 [[nodiscard]]
static constexpr bool traversableRay(
Pred const& p,
Tree const& t,
134template <Filterable T, Filterable L, Filterable R>
136 : std::disjunction<contains_pred<T, L>, contains_pred<T, R>> {
139template <Filterable T, Filterable L, Filterable R>
Utilizing curiously recurring template pattern (CRTP)