5#ifndef INCLUDE_GUARD_ARENE_BASE_ARENE_BASE_FUNCTIONAL_NOT_FN_HPP_
6#define INCLUDE_GUARD_ARENE_BASE_ARENE_BASE_FUNCTIONAL_NOT_FN_HPP_
12#include "arene/base/compiler_support/cpp14_inline.hpp"
13#include "arene/base/functional/invoke.hpp"
14#include "arene/base/functional/perfect_forward_call_wrapper.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
41 noexcept((
noexcept(!::arene::base::invoke(std::forward<FuncT>(func), std::forward<CallArgsT>(call_args)...))))
42 ->
decltype(!::arene::base::invoke(std::forward<FuncT>(func), std::forward<CallArgsT>(call_args)...)) {
43 return !::arene::base::invoke(std::forward<FuncT>(func), std::forward<CallArgsT>(call_args)...);
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)
77 -> not_fn_detail::not_fn_t<std::decay_t<BoundFunc>> {
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."
86 return not_fn_detail::not_fn_t<std::decay_t<BoundFunc>>{std::forward<BoundFunc>(bound_func)};
Definition array_exceptions_disabled.cpp:11
ARENE_CPP14_INLINE_VARIABLE(not_fn_detail::not_fn_impl, not_fn)
Copyright 2026, Toyota Motor Corporation.
Definition array_exceptions_disabled.cpp:10