[#BloombergLP-bslstl-Optional_Base-05-value-07a] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bslstl.adoc[bslstl]::xref:BloombergLP/bslstl/Optional_Base-05.adoc[Optional_Base]::value :relfileprefix: ../../../ :mrdocs: `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. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- t_TYPE& xref:BloombergLP/bslstl/Optional_Base-05/value-0f.adoc[value]() &; ---- [.small]#xref:BloombergLP/bslstl/Optional_Base-05/value-0f.adoc[_» more..._]# Return an rvalue reference to the contained value; throws if disengaged. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- t_TYPE&& xref:BloombergLP/bslstl/Optional_Base-05/value-073.adoc[value]() &&; ---- [.small]#xref:BloombergLP/bslstl/Optional_Base-05/value-073.adoc[_» more..._]# Return a reference providing non‐modifiable access to the underlying `t_TYPE` object if `true == has_value()` and throw `bsl::bad_optional_access` otherwise. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- t_TYPE const& xref:BloombergLP/bslstl/Optional_Base-05/value-0d.adoc[value]() const &; ---- [.small]#xref:BloombergLP/bslstl/Optional_Base-05/value-0d.adoc[_» more..._]# Return an rvalue reference to the underlying `t_TYPE` object if `true == has_value()` and throw `bsl::bad_optional_access` otherwise. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- t_TYPE const&& xref:BloombergLP/bslstl/Optional_Base-05/value-0c.adoc[value]() const &&; ---- [.small]#xref:BloombergLP/bslstl/Optional_Base-05/value-0c.adoc[_» more..._]# [.small]#Created with https://www.mrdocs.com[MrDocs]#