TValueOrError

Type used to return either some data, or an error

Windows
MacOS
Linux

References

Module

Core

Header

/Engine/Source/Runtime/Core/Public/Math/UnitConversion.inl

Include

#include "Math/UnitConversion.inl"

Syntax

template<typename ValueType, typename ErrorType>
class TValueOrError

Remarks

Type used to return either some data, or an error

Constructors

Name Description

Public function

TValueOrError

(
    TValueOrError_ValueProxy< A >&& Pr...
)

Construct the result from a value, or an error (See MakeValue and MakeError)

Public function

TValueOrError

(
    TValueOrError_ErrorProxy< A >&& Pr...
)

Public function

TValueOrError

(
    TValueOrError&& In
)

Move construction/assignment

Functions

Name Description

Public function

ErrorType &

 

GetError()

Get the error, if set

Public function Const

const ErrorT...

 

GetError()

Public function

ValueType &

 

GetValue()

Access the value contained in this result

Public function Const

const ValueT...

 

GetValue()

Public function Const

bool

 

IsValid()

Check whether this value is valid

Public function

ErrorType

 

StealError()

Steal this result's error, if set, causing it to become unset

Public function

ValueType

 

StealValue()

Steal this result's value, causing it to become unset

Operators

Name Description

Public function

TValueOrErro...

 

operator=

(
    TValueOrError&& In
)

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss