[#util-Result-2constructor-09] = xref:util.adoc[util]::xref:util/Result.adoc[Result]::Result :relfileprefix: ../../ :mrdocs: Constructors == Synopses Declared in `<util/result.h>` Constructs a successful result holding a default‐constructed (void) value. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:util/Result/2constructor-0f.adoc[Result](); ---- [.small]#xref:util/Result/2constructor-0f.adoc[_» more..._]# Move‐constructs a result, transferring the value or error. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:util/Result/2constructor-02.adoc[Result](xref:util/Result.adoc[Result]&& other) = default; ---- [.small]#xref:util/Result/2constructor-02.adoc[_» more..._]# Constructs a failed result holding the given error message. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:util/Result/2constructor-0b.adoc[Result](xref:util/Error.adoc[Error] error); ---- [.small]#xref:util/Result/2constructor-0b.adoc[_» more..._]# Constructs a successful result holding the given value. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:util/Result/2constructor-03.adoc[Result](xref:util/Result.adoc[T] obj); ---- [.small]#xref:util/Result/2constructor-03.adoc[_» more..._]# == Parameters [cols="1,4"] |=== | Name| Description | *other* | the result to move from | *error* | the error carrier whose message is moved into the result | *obj* | the success value to store |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#