std::copyable_function:: operator()
|
R operator
(
)
(
Args...
args
)
/*cv*/
/*ref*/
noexcept
(
/*noex*/
)
;
|
(C++26以降) | |
格納された呼び出し可能ターゲットをパラメータ
args
で呼び出します。
/*cv*/
、
/*ref*/
および
/*noex*/
の部分は、
operator
(
)
のテンプレートパラメータと同一です。
return
std::
invoke_r
<
R
>
(
/*cv-ref-cast*/
(
f
)
,
std::
forward
<
Args
>
(
args
)
...
)
;
と等価です。ここで
f
は
*
this
のターゲットオブジェクトを表すCV修飾されていない左辺値であり、
/*cv-ref-cast*/
(
f
)
は以下と等価です:
- f cv ref が空または & の場合、または
- std:: as_const ( f ) cv ref が const または const & の場合、または
- std :: move ( f ) cv ref が && の場合、または
- std :: move ( std:: as_const ( f ) ) cv ref が const && の場合。
* this が空の場合、動作は未定義です。
目次 |
パラメータ
| args | - | 格納された呼び出し可能ターゲットに渡すパラメータ |
戻り値
std:: invoke_r < R > ( /*cv-ref-cast*/ ( f ) , std:: forward < Args > ( args ) ... ) .
例外
基になる関数呼び出しによってスローされた例外を伝播します。
例
|
このセクションは不完全です
理由: 例がありません |
関連項目
|
ターゲットを呼び出す
(
std::function<R(Args...)>
の公開メンバ関数)
|
|
|
ターゲットを呼び出す
(
std::move_only_function
の公開メンバ関数)
|
|
|
格納された関数を呼び出す
(
std::reference_wrapper<T>
の公開メンバ関数)
|
|
|
(C++17)
(C++23)
|
任意の
Callable
オブジェクトを指定された引数で呼び出す
(戻り値の型を指定可能)
(C++23以降)
(関数テンプレート) |