Files
2025-10-25 03:02:53 +03:00

2.9 KiB
Raw Permalink Blame History

[func.not.fn]

22 General utilities library [utilities]

22.10 Function objects [function.objects]

22.10.13 Function template not_fn [func.not.fn]

🔗

template<class F> constexpr unspecified not_fn(F&& f);

1

#

In the text that follows:

g is a value of the result of a not_fn invocation,

FD is the type decay_t,

fd is the target object of g ([func.def]) of type FD, direct-non-list-initialized with std::forward<F>(f),

call_args is an argument pack used in a function call expression ([expr.call]) of g.

2

#

Mandates: is_constructible_v<FD, F> && is_move_constructible_v is true.

3

#

Preconditions: FD meets the Cpp17MoveConstructible requirements.

4

#

Returns: A perfect forwarding call wrapper ([func.require]) g with call pattern !invoke(fd, call_args...).

5

#

Throws: Any exception thrown by the initialization of fd.

🔗

template<auto f> constexpr unspecified not_fn() noexcept;

6

#

In the text that follows:

F is the type of f,

g is a value of the result of a not_fn invocation,

call_args is an argument pack used in a function call expression ([expr.call]) of g.

7

#

Mandates: If is_pointer_v || is_member_pointer_v is true, then f != nullptr is true.

8

#

Returns: A perfect forwarding call wrapper ([func.require]) g that does not have state entities, and has the call pattern !invoke(f, call_args...).