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)