std::function_ref:: operator=
From cppreference.net
<
cpp
|
utility
|
functional
|
function ref
C++
Utilities library
|
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Function objects
|
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Old binders and adaptors | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
std::function_ref
| Member functions | ||||
|
function_ref::operator=
|
||||
| Deduction guides |
|
constexpr
function_ref
&
operator
=
(
const
function_ref
&
)
noexcept
=
default
;
|
(1) | (C++26以降) |
|
template
<
class
T
>
constexpr function_ref & operator = ( T ) = delete ; |
(2) | (C++26以降) |
1)
コピー代入演算子は明示的にデフォルト化されています。
std::function_ref
は
copyable
および
TriviallyCopyable
を満たします。このデフォルト化された代入演算子は、格納されている
thunk-ptr
および
bound-entity
の浅いコピーを実行します。
2)
ユーザー定義代入演算子は、
T
が
std::function_ref
と同じ型でなく、
std::
is_pointer_v
<
T
>
が
false
であり、かつ
T
が
std::nontype_t
の特殊化でない場合に明示的に削除されます。このオーバーロードは、上記の条件で制約が満たされる場合にのみオーバーロード解決に参加します。
戻り値
* this
関連項目
新しい
function_ref
オブジェクトを構築する
(public member function) |
|
|
ターゲットを置換または破棄する
(
std::copyable_function
のpublic member function)
|
|
|
新しいターゲットを割り当てる
(
std::function<R(Args...)>
のpublic member function)
|
|
|
ターゲットを置換または破棄する
(
std::move_only_function
のpublic member function)
|