[#BloombergLP-bslstl-Optional_Base-05-value_or-07] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bslstl.adoc[bslstl]::xref:BloombergLP/bslstl/Optional_Base-05.adoc[Optional_Base]::value_or :relfileprefix: ../../../ :mrdocs: Return the contained value, or a converted fallback if disengaged. == Synopses Declared in `<bslstl_optional.h>` Return the contained value, or a converted fallback if disengaged. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template<class t_ANY_TYPE> t_TYPE xref:BloombergLP/bslstl/Optional_Base-05/value_or-09.adoc[value_or](t_ANY_TYPE&& value) &&; ---- [.small]#xref:BloombergLP/bslstl/Optional_Base-05/value_or-09.adoc[_» more..._]# Return the contained value, or a converted fallback if disengaged. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template<class t_ANY_TYPE> t_TYPE xref:BloombergLP/bslstl/Optional_Base-05/value_or-04a.adoc[value_or](t_ANY_TYPE&& value) const &; ---- [.small]#xref:BloombergLP/bslstl/Optional_Base-05/value_or-04a.adoc[_» more..._]# Return the contained value, or a converted fallback if disengaged. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template<class t_ANY_TYPE> t_TYPE xref:BloombergLP/bslstl/Optional_Base-05/value_or-0a.adoc[value_or]( std::allocator_arg_t allocatorArg, xref:BloombergLP/bslstl/Optional_Base-05/allocator_type.adoc[allocator_type] allocator, t_ANY_TYPE&& value) &&; ---- [.small]#xref:BloombergLP/bslstl/Optional_Base-05/value_or-0a.adoc[_» more..._]# Return the contained value, or a converted fallback if disengaged. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template<class t_ANY_TYPE> t_TYPE xref:BloombergLP/bslstl/Optional_Base-05/value_or-041.adoc[value_or]( std::allocator_arg_t allocatorArg, xref:BloombergLP/bslstl/Optional_Base-05/allocator_type.adoc[allocator_type] allocator, t_ANY_TYPE&& value) const &; ---- [.small]#xref:BloombergLP/bslstl/Optional_Base-05/value_or-041.adoc[_» more..._]# == Return Value contained value if engaged, otherwise `value` converted to `t_TYPE` == Parameters [cols="1,4"] |=== | Name| Description | *value* | value compared with or used to initialize the optional | *allocatorArg* | tag selecting the allocator‐extended constructor | *allocator* | allocator used to supply memory |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#