bsl::function::operator=

Assignment operators

Synopses

Declared in <bslstl_function.h>

Copy-assign the target from rhs and return *this.

bsl::function<PROTOTYPE>&
operator=(function const& rhs);
» more...

Set this object to empty and return *this.

bsl::function<PROTOTYPE>&
operator=(nullptr_t unused) noexcept;
» more...

Move-assign the target from rhs and return *this.

bsl::function<PROTOTYPE>&
operator=(BloombergLP::bslmf::MovableRef<function> rhs);
» more...

Assign from a reference_wrapper target and return *this.

template<class FUNC>
function&
operator=(bsl::reference_wrapper<FUNC> rhs) noexcept
requires IsInvocableWithPrototype<typename Decay<FUNC>::type>::value;
» more...

Assign a new callable target from the specified rhs and return *this.

template<class FUNC>
function&
operator=(FUNC&& rhs)
requires ! IsReferenceCompatible<typename Decay<FUNC>::type, function>::value
        &&   IsInvocableWithPrototype<typename Decay<FUNC>::type>::value;
» more...

Return Value

reference providing modifiable access to this object

Parameters

NameDescription
rhsfunction whose target is copied into this object
unusednull pointer literal selecting the empty state