[#BloombergLP-bslstl-Optional_Base-05-value-0d] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bslstl.adoc[bslstl]::xref:BloombergLP/bslstl/Optional_Base-05.adoc[Optional_Base]::value :relfileprefix: ../../../ :mrdocs: Return a reference providing non‐modifiable access to the underlying `t_TYPE` object if `true == has_value()` and throw `bsl::bad_optional_access` otherwise. == Synopsis Declared in `<bslstl_optional.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- t_TYPE const& value() const &; ---- [.small]#Created with https://www.mrdocs.com[MrDocs]#