Assign to this object the value of the specified rhs optional.

Synopsis

Declared in <bdlb_nullablevalue.h>

template<class BDE_OTHER_TYPE>
NullableValue<TYPE>&
operator=(bsl::optional<BDE_OTHER_TYPE> const& rhs)
requires bsl::is_convertible<BDE_OTHER_TYPE, TYPE>::value;

Description

Assign to this object the null value if the specified rhs object is null, and the value of rhs.value() (of BDE_OTHER_TYPE) converted to TYPE otherwise. Return a reference providing modifiable access to this object. Note that this method will fail to compile if TYPE and `BDE_OTHER_TYPE' are not compatible.

Return Value

a reference providing modifiable access to this object

Parameters

Name

Description

rhs

optional value assigned to this object

Created with MrDocs