R operator()( Args... args ) /*cv*/ /*ref*/ noexcept(/*noex*/);
(since C++26)Invokes the stored callable target with the parameters args
. The /*cv*/, /*ref*/, and /*noex*/ parts of operator() are identical to those of the template parameter of std::copyable_function
.
Equivalent to return std::invoke_r<R>(/*cv-ref-cast*/(f), std::forward<Args>(args)...);, where f
is a cv-unqualified lvalue that denotes the target object of *this, and /*cv-ref-cast*/(f) is equivalent to:
The behavior is undefined if *this is empty.
[edit] Parameters args - parameters to pass to the stored callable target [edit] Return valuestd::invoke_r<R>(/*cv-ref-cast*/(f), std::forward<Args>(args)...).
[edit] ExceptionsPropagates the exception thrown by the underlying function call.
[edit] Example [edit] See also invokes the targetstd::function<R(Args...)>
) [edit] invokes the target
std::move_only_function
) [edit] calls the stored function
std::reference_wrapper<T>
) [edit] invokes any Callable object with given arguments and possibility to specify return type(since C++23)
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4