value overloads

Synopses

Declared in <bslstl_optional.h>

Return a reference providing modifiable access to the underlying t_TYPE object if true == has_value() and throw bsl::bad_optional_access otherwise.

t_TYPE&
value() &;

Return an rvalue reference to the contained value; throws if disengaged.

t_TYPE&&
value() &&;

Return a reference providing non‐modifiable access to the underlying t_TYPE object if true == has_value() and throw bsl::bad_optional_access otherwise.

t_TYPE const&
value() const &;

Return an rvalue reference to the underlying t_TYPE object if true == has_value() and throw bsl::bad_optional_access otherwise.

t_TYPE const&&
value() const &&;

Created with MrDocs