Assign from a reference_wrapper target and return *this.
Declared in <bslstl_function.h>
template<class FUNC>
function&
operator=(bsl::reference_wrapper<FUNC> rhs) noexcept
requires IsInvocableWithPrototype<typename Decay<FUNC>::type>::value;
Destroy the current target (if any) of this object, then set the target to the specified rhs wrapper containing a reference to a callable object and return *this. The result is equivalent to having constructed *this from rhs and this->get_allocator(). Note that this assignment is a separate overload only because it is unconditionally noexcept.
reference providing modifiable access to this object
| Name | Description |
|---|---|
| rhs | reference wrapper holding the new target |