LLVM  14.0.0git
Public Member Functions | List of all members
llvm::MSVCPExpected< T > Class Template Reference

#include "llvm/Support/MSVCErrorWorkarounds.h"

Inheritance diagram for llvm::MSVCPExpected< T >:
Inheritance graph
[legend]
Collaboration diagram for llvm::MSVCPExpected< T >:
Collaboration graph
[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. More...
 
 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. More...
 
template<typename OtherT >
 Expected (OtherT &&Val, std::enable_if_t< std::is_convertible< OtherT, T >::value > *=nullptr)
 Create an Expected<T> success value from the given OtherT value, which must be convertible to T. More...
 
 Expected (Expected &&Other)
 Move construct an Expected<T> value. More...
 
template<class OtherT >
 Expected (Expected< OtherT > &&Other, std::enable_if_t< std::is_convertible< OtherT, T >::value > *=nullptr)
 Move construct an Expected<T> value from an Expected<OtherT>, where OtherT must be convertible to T. More...
 
template<class OtherT >
 Expected (Expected< OtherT > &&Other, std::enable_if_t<!std::is_convertible< OtherT, T >::value > *=nullptr)
 Move construct an Expected<T> value from an Expected<OtherT>, where OtherT isn't convertible to T. More...
 
Expectedoperator= (Expected &&Other)
 Move-assign from another Expected<T>. More...
 
 ~Expected ()
 Destroy an Expected<T>. More...
 
 operator bool ()
 Return false if there is an error. More...
 
reference get ()
 Returns a reference to the stored T value. More...
 
const_reference get () const
 Returns a const reference to the stored T value. More...
 
template<class OtherT >
Error moveInto (OtherT &Value, std::enable_if_t< std::is_assignable< OtherT &, T && >::value > *=nullptr) &&
 Returns takeError() after moving the held T (if any) into V. More...
 
template<typename ErrT >
bool errorIsA () const
 Check that this Expected<T> is an error of type ErrT. More...
 
Error takeError ()
 Take ownership of the stored error. More...
 
pointer operator-> ()
 Returns a pointer to the stored T value. More...
 
const_pointer operator-> () const
 Returns a const pointer to the stored T value. More...
 
reference operator* ()
 Returns a reference to the stored T value. More...
 
const_reference operator* () const
 Returns a const reference to the stored T value. More...
 

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]

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

Definition at line 45 of file MSVCErrorWorkarounds.h.

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

◆ MSVCPExpected() [2/6]

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

Definition at line 50 of file MSVCErrorWorkarounds.h.

References Other, and T.

◆ MSVCPExpected() [3/6]

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

Definition at line 57 of file MSVCErrorWorkarounds.h.

◆ 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 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 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 Other, and T.

Member Function Documentation

◆ operator=()

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

Definition at line 52 of file MSVCErrorWorkarounds.h.

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


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