A default‐constructible Expected suitable for use with MSVC's std::future.

Synopsis

Declared in <llvm/Support/MSVCErrorWorkarounds.h>

template<typename T>
class MSVCPExpected
    : public Expected<T>

Base Classes

Name

Description

Expected<T>

Tagged union holding either a T or a Error.

Type Aliases

Name

Description

storage_type

Storage type for either a value or an error payload.

value_type

Value type held when the Expected represents success.

Member Functions

Name

Description

MSVCPExpected [constructor]

Constructors

operator=

Assignment operators

errorIsA

Check that this Expected<T> is an error of type ErrT.

get

get overloads

moveInto

Returns takeError() after moving the held T (if any) into Value.

operator*

Dereference operators

operator‐>

Member access operators

takeError

Take ownership of the stored error.

operator bool

Return false if there is an error.

Data Members

Name

Description

ErrorStorage [variant member]

Storage for the contained error payload.

TStorage [variant member]

Storage for the contained value.

Non-Member Functions

Name

Description

expectedToErrorOr

Convert an Expected<T> to an ErrorOr<T>.

expectedToOptional

Convert an Expected to an optional, discarding any error.

Created with MrDocs