Assignment operators

Synopses

Declared in <bdlb_nullablevalue.h>

Assign to this object the value of the specified rhs, and return a reference providing modifiable access to this object.

Assign to this object the value of the specified rhs object, and return a non‐`const` reference to this object.

Assign to this object from the specified rhs nullable value.

template<class BDE_OTHER_TYPE>
NullableValue<TYPE>&
operator=(NullableValue<BDE_OTHER_TYPE> const& rhs);

Assign a new value to this optional.

template<class t_ANY_TYPE>
constexpr
optional<t_TYPE>&
operator=(optional<t_ANY_TYPE> const& rhs);

Assign a new value to this optional.

constexpr
optional<t_TYPE>&
operator=(bsl::nullopt_t nullopt) noexcept;

Move‐assign the specified rhs to this object.

Move‐assign the specified rhs to this object.

Assign a new value to this optional.

Assign to this object the value of the specified rhs, and return a reference providing modifiable access to this object.

NullableValue<TYPE>&
operator=(TYPE const& rhs);

Reset this object to the default constructed state (i.e., to have the null value), and return a reference providing modifiable access to this object.

NullableValue<TYPE>&
operator=(bsl::nullopt_t const& nullopt) noexcept;

Assign to this object by moving from the specified rhs.

Assign a new value to this optional.

Assign to this object by moving from the specified rhs optional.

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

Assign to this object the specified rhs converted to TYPE.

template<class BDE_OTHER_TYPE>
NullableValue<TYPE>&
operator=(BDE_OTHER_TYPE const& rhs);

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

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

Assign a new value to this optional.

template<class t_ANY_TYPE = t_TYPE>
constexpr
optional<t_TYPE>&
operator=(std::optional<t_ANY_TYPE> const& rhs);

Assign a new value to this optional.

template<class t_ANY_TYPE = t_TYPE>
constexpr
optional<t_TYPE>&
operator=(t_ANY_TYPE&& rhs);

Assign a new value to this optional.

template<class t_ANY_TYPE = t_TYPE>
constexpr
optional<t_TYPE>&
operator=(std::optional<t_ANY_TYPE>&& rhs);

Return Value

  • a reference providing modifiable access to this object

  • reference providing modifiable access to this object

Parameters

Name

Description

rhs

object whose value is assigned to this object

nullopt

disengaged‐optional tag; value is unused

Created with MrDocs