5#ifndef INCLUDE_GUARD_ARENE_BASE_ARENE_BASE_FUNCTIONAL_NOT_FN_HPP_
6#define INCLUDE_GUARD_ARENE_BASE_ARENE_BASE_FUNCTIONAL_NOT_FN_HPP_
15#include "arene/base/stdlib_choice/decay.hpp"
16#include "arene/base/stdlib_choice/forward.hpp"
17#include "arene/base/stdlib_choice/is_constructible.hpp"
18#include "arene/base/stdlib_choice/is_move_constructible.hpp"
24namespace not_fn_detail {
39 template <
typename FuncT,
typename BoundArgsTupleT,
typename... CallArgsT>
40 constexpr auto operator()(FuncT&& func, BoundArgsTupleT&&, CallArgsT&&... call_args)
const
52template <
typename BoundFunc>
53class not_fn_t :
public functional_detail::perfect_forward_call_wrapper<not_fn_policy, BoundFunc> {
55 using functional_detail::perfect_forward_call_wrapper<not_fn_policy, BoundFunc>::perfect_forward_call_wrapper;
74 template <
typename BoundFunc>
75 constexpr auto operator()(BoundFunc&& bound_func)
const
76 noexcept(std::is_nothrow_constructible<std::decay_t<BoundFunc>, BoundFunc>::value)
79 std::is_constructible<std::decay_t<BoundFunc>, BoundFunc&&>::value,
80 "Bound function must be constructible from input."
83 std::is_move_constructible<std::decay_t<BoundFunc>>::value,
84 "Bound function must be move-constructible."
#define ARENE_CPP14_INLINE_VARIABLE(type, name)
Emulates C++17's inline variable declarations for function objects.
Definition cpp14_inline.hpp:69
Definition accumulate.hpp:37
constexpr auto invoke(F &&func, Args &&... args) noexcept(is_nothrow_invocable_v< F, Args... >) ->
Implementation of std::invoke from C++23: invokes the specified callable with the specified arguments...
Definition invoke.hpp:281
Definition accumulate.hpp:36
typename decay< Type >::type decay_t
A conversion equivalent to those performed when passing function arguments by value.
Definition decay.hpp:48
constexpr auto forward(remove_reference_t< T > &value) noexcept -> T &&
Cast a value to an rvalue if T is an rvalue or rvalue reference, otherwise forward an lvalue referenc...
Definition forward.hpp:24