Assign from a reference_wrapper target and return *this.
Synopsis
Declared in <bslstl_function.h>
template<class FUNC>
function&
operator=(bsl::reference_wrapper<FUNC> rhs) noexcept
requires IsInvocableWithPrototype<typename Decay<FUNC>::type>::value;
Description
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.
Return Value
reference providing modifiable access to this object
Parameters
Name |
Description |
rhs |
reference wrapper holding the new target |
Created with MrDocs