[#util-Result-value_or-0e] = xref:util.adoc[util]::xref:util/Result.adoc[Result]::value_or :relfileprefix: ../../ :mrdocs: `value_or` overloads == Synopses Declared in `<util/result.h>` Returns the held value, or a fallback when the result holds an error. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template<class U> xref:util/Result.adoc[T] xref:util/Result/value_or-05.adoc[value_or](U&& default_value) const &; ---- [.small]#xref:util/Result/value_or-05.adoc[_» more..._]# Returns the held value by move, or a fallback when the result holds an error. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template<class U> xref:util/Result.adoc[T] xref:util/Result/value_or-06.adoc[value_or](U&& default_value) &&; ---- [.small]#xref:util/Result/value_or-06.adoc[_» more..._]# == Return Value the stored value if present, otherwise default_value == Parameters [cols="1,4"] |=== | Name| Description | *default_value* | the value returned when no value is held |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#