LLVM 22.0.0git
|
#include "llvm/Support/MSVCErrorWorkarounds.h"
Public Member Functions | |
MSVCPExpected () | |
MSVCPExpected (MSVCPExpected &&Other) | |
MSVCPExpected & | operator= (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. | |
Expected & | operator= (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 |
Definition at line 43 of file MSVCErrorWorkarounds.h.
|
inline |
Definition at line 45 of file MSVCErrorWorkarounds.h.
References llvm::consumeError(), llvm::Expected< T >::Expected, llvm::inconvertibleErrorCode(), llvm::make_error(), T, and llvm::Expected< T >::takeError().
Referenced by MSVCPExpected(), and operator=().
|
inline |
Definition at line 50 of file MSVCErrorWorkarounds.h.
References llvm::Expected< T >::Expected, llvm::move(), MSVCPExpected(), llvm::Other, and T.
|
inline |
Definition at line 57 of file MSVCErrorWorkarounds.h.
References llvm::Expected< T >::Expected, llvm::move(), and T.
|
inline |
Definition at line 60 of file MSVCErrorWorkarounds.h.
References llvm::Expected< T >::Expected, llvm::move(), and T.
|
inline |
Definition at line 66 of file MSVCErrorWorkarounds.h.
References llvm::Expected< T >::Expected, llvm::move(), llvm::Other, and T.
|
inlineexplicit |
Definition at line 72 of file MSVCErrorWorkarounds.h.
References llvm::Expected< T >::Expected, llvm::move(), llvm::Other, and T.
|
inline |
Definition at line 52 of file MSVCErrorWorkarounds.h.
References MSVCPExpected(), llvm::Expected< T >::operator=(), and llvm::Other.