6#ifndef SIMPLE_UTILITY_FUNCTIONAL_MIXINS_DISJUNCTION_HPP
7#define SIMPLE_UTILITY_FUNCTIONAL_MIXINS_DISJUNCTION_HPP
21 template <
class... PackedFns,
class... Args>
22 requires (... && std::predicate<PackedFns, Args...>)
24 constexpr bool operator ()(
25 std::tuple<PackedFns...>&& fnPack,
28 noexcept((... && std::is_nothrow_invocable_v<PackedFns, Args...>))
31 [&]<
class... Fns>(Fns&&... fns)
33 return (std::invoke(std::forward<Fns>(fns), args...) || ...);
39 template <concepts::unqualified Derived>
46 static_assert(std::is_base_of_v<DisjunctionOperator, Derived>,
"Derived doesn't inherit from DisjunctionOperator.");
48 std::copy_constructible<Derived> || std::move_constructible<Derived>,
49 "Derived is neither move- nor copy-constructible.");
63 template <
class Other>
69 )
noexcept(
noexcept(make_composition<DisjunctionStrategy>(first, std::declval<Other>())))
71 return envelop<closure_template<Derived>::template type>(
72 make_composition<DisjunctionStrategy>(first, std::forward<Other>(other)));
75 template <
class Other>
81 )
noexcept(
noexcept(make_composition<DisjunctionStrategy>(std::move(first), std::declval<Other>())))
83 return envelop<closure_template<Derived>::template type>(
84 make_composition<DisjunctionStrategy>(std::move(first), std::forward<Other>(other)));
Definition: Disjunction.hpp:41
~DisjunctionOperator()=default
DisjunctionOperator(const DisjunctionOperator &)=default
constexpr DisjunctionOperator() noexcept
Definition: Disjunction.hpp:44
DisjunctionOperator & operator=(const DisjunctionOperator &)=default
DisjunctionOperator(DisjunctionOperator &&)=default
friend constexpr auto operator||(const Derived &first, Other &&other) noexcept(noexcept(make_composition< DisjunctionStrategy >(first, std::declval< Other >())))
Definition: Disjunction.hpp:66
Determines whether the given type satisfies the constraints of a function type.
Definition: BasicClosure.hpp:79
Definition: Arithmetic.hpp:13
Definition: Disjunction.hpp:20