Difference between revisions of "cpp/utility/functional/function ref/operator()"
From cppreference.com
< cpp | utility | functional | function ref
m (fmt) |
Andreas Krug (Talk | contribs) m (fmt) |
||
Line 1: | Line 1: | ||
− | {{cpp/utility/functional/function_ref/title | operator()}} | + | {{cpp/utility/functional/function_ref/title|operator()}} |
{{cpp/utility/functional/function_ref/navbar}} | {{cpp/utility/functional/function_ref/navbar}} | ||
− | {{ddcl | since=c++26 | | + | {{ddcl|since=c++26| |
R operator()( Args... args ) const noexcept(/*noex*/); | R operator()( Args... args ) const noexcept(/*noex*/); | ||
}} | }} | ||
Line 11: | Line 11: | ||
===Parameters=== | ===Parameters=== | ||
{{par begin}} | {{par begin}} | ||
− | {{par | args | rest parameters to pass to the stored {{tti|thunk-ptr}}}} | + | {{par|args|rest parameters to pass to the stored {{tti|thunk-ptr}}}} |
{{par end}} | {{par end}} | ||
Line 25: | Line 25: | ||
===See also=== | ===See also=== | ||
{{dsc begin}} | {{dsc begin}} | ||
− | {{dsc inc | cpp/utility/functional/function/dsc operator()}} | + | {{dsc inc|cpp/utility/functional/function/dsc operator()}} |
− | {{dsc inc | cpp/utility/functional/reference_wrapper/dsc operator()}} | + | {{dsc inc|cpp/utility/functional/reference_wrapper/dsc operator()}} |
{{dsc end}} | {{dsc end}} | ||
{{langlinks|de|es|fr|it|ja|pt|ru|zh}} | {{langlinks|de|es|fr|it|ja|pt|ru|zh}} |
Latest revision as of 00:42, 4 January 2024
R operator()( Args... args ) const noexcept(/*noex*/); |
(since C++26) | |
Invokes the stored thunk-ptr with bound-entity as its first parameter and the rest of the parameters args
. The /*noex*/ part of operator() is identical to those of the template parameter of std::function_ref
.
Equivalent to return thunk-ptr
(bound-entity
, std::forward<Args>(args)...);.
Contents |
[edit] Parameters
args | - | rest parameters to pass to the stored thunk-ptr
|
[edit] Return value
thunk-ptr
(bound-entity
, std::forward<Args>(args)...).
[edit] Exceptions
Propagates the exception thrown by the underlying function call.
[edit] Example
This section is incomplete Reason: no example |
[edit] See also
invokes the target (public member function of std::function<R(Args...)> )
| |
calls the stored function (public member function of std::reference_wrapper<T> )
|