LLVM 22.0.0git
llvm::MSVCPExpected< T > Class Template Reference

#include "llvm/Support/MSVCErrorWorkarounds.h"

Inheritance diagram for llvm::MSVCPExpected< T >:
[legend]

Public Member Functions

 MSVCPExpected ()
 MSVCPExpected (MSVCPExpected &&Other)
MSVCPExpectedoperator= (MSVCPExpected &&Other)
 MSVCPExpected (Error Err)
template<typename OtherT>
 MSVCPExpected (OtherT &&Val, std::enable_if_t< std::is_convertible< OtherT, T >::value > *=nullptr)
template<class OtherT>
 MSVCPExpected (Expected< OtherT > &&Other, std::enable_if_t< std::is_convertible< OtherT, T >::value > *=nullptr)
template<class OtherT>
 MSVCPExpected (Expected< OtherT > &&Other, std::enable_if_t<!std::is_convertible< OtherT, T >::value > *=nullptr)
Public Member Functions inherited from llvm::Expected< T >
 Expected (Error &&Err)
 Create an Expected<T> error value from the given Error.
 Expected (ErrorSuccess)=delete
 Forbid to convert from Error::success() implicitly, this avoids having Expected<T> foo() { return Error::success(); } which compiles otherwise but triggers the assertion above.
template<typename OtherT>
 Expected (OtherT &&Val, std::enable_if_t< std::is_convertible_v< OtherT, T > > *=nullptr)
 Create an Expected<T> success value from the given OtherT value, which must be convertible to T.
 Expected (Expected &&Other)
 Move construct an Expected<T> value.
template<class OtherT>
 Expected (Expected< OtherT > &&Other, std::enable_if_t< std::is_convertible_v< OtherT, T > > *=nullptr)
 Move construct an Expected<T> value from an Expected<OtherT>, where OtherT must be convertible to T.
template<class OtherT>
 Expected (Expected< OtherT > &&Other, std::enable_if_t<!std::is_convertible_v< OtherT, T > > *=nullptr)
 Move construct an Expected<T> value from an Expected<OtherT>, where OtherT isn't convertible to T.
Expectedoperator= (Expected &&Other)
 Move-assign from another Expected<T>.
 ~Expected ()
 Destroy an Expected<T>.
 operator bool ()
 Return false if there is an error.
reference get ()
 Returns a reference to the stored T value.
const_reference get () const
 Returns a const reference to the stored T value.
template<class OtherT>
Error moveInto (OtherT &Value, std::enable_if_t< std::is_assignable_v< OtherT &, T && > > *=nullptr) &&
 Returns takeError() after moving the held T (if any) into V.
template<typename ErrT>
bool errorIsA () const
 Check that this Expected<T> is an error of type ErrT.
Error takeError ()
 Take ownership of the stored error.
pointer operator-> ()
 Returns a pointer to the stored T value.
const_pointer operator-> () const
 Returns a const pointer to the stored T value.
reference operator* ()
 Returns a reference to the stored T value.
const_reference operator* () const
 Returns a const reference to the stored T value.

Additional Inherited Members

Public Types inherited from llvm::Expected< T >
using storage_type = std::conditional_t<isRef, wrap, T>
using value_type = T

Detailed Description

template<typename T>
class llvm::MSVCPExpected< T >

Definition at line 43 of file MSVCErrorWorkarounds.h.

Constructor & Destructor Documentation

◆ MSVCPExpected() [1/6]

◆ MSVCPExpected() [2/6]

template<typename T>
llvm::MSVCPExpected< T >::MSVCPExpected ( MSVCPExpected< T > && Other)
inline

◆ MSVCPExpected() [3/6]

template<typename T>
llvm::MSVCPExpected< T >::MSVCPExpected ( Error Err)
inline

Definition at line 57 of file MSVCErrorWorkarounds.h.

References llvm::Expected< T >::Expected, llvm::move(), and T.

◆ MSVCPExpected() [4/6]

template<typename T>
template<typename OtherT>
llvm::MSVCPExpected< T >::MSVCPExpected ( OtherT && Val,
std::enable_if_t< std::is_convertible< OtherT, T >::value > * = nullptr )
inline

Definition at line 60 of file MSVCErrorWorkarounds.h.

References llvm::Expected< T >::Expected, llvm::move(), and T.

◆ MSVCPExpected() [5/6]

template<typename T>
template<class OtherT>
llvm::MSVCPExpected< T >::MSVCPExpected ( Expected< OtherT > && Other,
std::enable_if_t< std::is_convertible< OtherT, T >::value > * = nullptr )
inline

Definition at line 66 of file MSVCErrorWorkarounds.h.

References llvm::Expected< T >::Expected, llvm::move(), llvm::Other, and T.

◆ MSVCPExpected() [6/6]

template<typename T>
template<class OtherT>
llvm::MSVCPExpected< T >::MSVCPExpected ( Expected< OtherT > && Other,
std::enable_if_t<!std::is_convertible< OtherT, T >::value > * = nullptr )
inlineexplicit

Definition at line 72 of file MSVCErrorWorkarounds.h.

References llvm::Expected< T >::Expected, llvm::move(), llvm::Other, and T.

Member Function Documentation

◆ operator=()

template<typename T>
MSVCPExpected & llvm::MSVCPExpected< T >::operator= ( MSVCPExpected< T > && Other)
inline

The documentation for this class was generated from the following file: