Namespaces
Variants

std::function_ref:: operator=

From cppreference.net
Utilities library
Function objects
Function invocation
(C++17) (C++23)
Identity function object
(C++20)
Old binders and adaptors
( until C++17* )
( until C++17* )
( until C++17* )
( until C++17* )
( until C++17* ) ( until C++17* ) ( until C++17* ) ( until C++17* )
( until C++20* )
( until C++20* )
( until C++17* ) ( until C++17* )
( until C++17* ) ( until C++17* )

( until C++17* )
( until C++17* ) ( until C++17* ) ( until C++17* ) ( until C++17* )
( until C++20* )
( until C++20* )
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)