[#util-Result-value_or-06] = xref:util.adoc[util]::xref:util/Result.adoc[Result]::value_or :relfileprefix: ../../ :mrdocs: Returns the held value by move, or a fallback when the result holds an error. == Synopsis Declared in `<util/result.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template<class U> xref:util/Result.adoc[T] value_or(U&& default_value) &&; ---- == 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]#