6#ifndef SIMPLE_UTILITY_FUNCTIONAL_MIXINS_CONJUNCTION_HPP
7#define SIMPLE_UTILITY_FUNCTIONAL_MIXINS_CONJUNCTION_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<ConjunctionOperator, Derived>,
"Derived doesn't inherit from ConjunctionOperator.");
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<ConjunctionStrategy>(first, std::declval<Other>())))
71 return envelop<closure_template<Derived>::template type>(
72 make_composition<ConjunctionStrategy>(first, std::forward<Other>(other)));
75 template <
class Other>
81 )
noexcept(
noexcept(make_composition<ConjunctionStrategy>(std::move(first), std::declval<Other>())))
83 return envelop<closure_template<Derived>::template type>(
84 make_composition<ConjunctionStrategy>(std::move(first), std::forward<Other>(other)));
Definition: Conjunction.hpp:41
constexpr ConjunctionOperator() noexcept
Definition: Conjunction.hpp:44
ConjunctionOperator(const ConjunctionOperator &)=default
ConjunctionOperator & operator=(const ConjunctionOperator &)=default
~ConjunctionOperator()=default
friend constexpr auto operator&&(const Derived &first, Other &&other) noexcept(noexcept(make_composition< ConjunctionStrategy >(first, std::declval< Other >())))
Definition: Conjunction.hpp:66
ConjunctionOperator(ConjunctionOperator &&)=default
Determines whether the given type satisfies the constraints of a function type.
Definition: BasicClosure.hpp:79
Definition: Arithmetic.hpp:13
Definition: Conjunction.hpp:20