MLIR  15.0.0git
Public Member Functions | List of all members
mlir::FailureOr< T > Class Template Reference

This class provides support for representing a failure result, or a valid value of type T. More...

#include "mlir/Support/LogicalResult.h"

+ Inheritance diagram for mlir::FailureOr< T >:
+ Collaboration diagram for mlir::FailureOr< T >:

Public Member Functions

 FailureOr (LogicalResult result)
 Allow constructing from a LogicalResult. More...
 
 FailureOr ()
 
 FailureOr (T &&y)
 
 FailureOr (const T &y)
 
template<typename U , std::enable_if_t< std::is_constructible< T, U >::value > * = nullptr>
 FailureOr (const FailureOr< U > &other)
 
 operator LogicalResult () const
 

Detailed Description

template<typename T>
class mlir::FailureOr< T >

This class provides support for representing a failure result, or a valid value of type T.

This allows for integrating with LogicalResult, while also providing a value on the success path.

Definition at line 77 of file LogicalResult.h.

Constructor & Destructor Documentation

◆ FailureOr() [1/5]

template<typename T>
mlir::FailureOr< T >::FailureOr ( LogicalResult  result)
inline

Allow constructing from a LogicalResult.

The result must be a failure. Success results should use a proper instance of type T.

Definition at line 81 of file LogicalResult.h.

References mlir::failed().

◆ FailureOr() [2/5]

template<typename T>
mlir::FailureOr< T >::FailureOr ( )
inline

Definition at line 85 of file LogicalResult.h.

◆ FailureOr() [3/5]

template<typename T>
mlir::FailureOr< T >::FailureOr ( T &&  y)
inline

Definition at line 86 of file LogicalResult.h.

◆ FailureOr() [4/5]

template<typename T>
mlir::FailureOr< T >::FailureOr ( const T &  y)
inline

Definition at line 87 of file LogicalResult.h.

References value.

◆ FailureOr() [5/5]

template<typename T>
template<typename U , std::enable_if_t< std::is_constructible< T, U >::value > * = nullptr>
mlir::FailureOr< T >::FailureOr ( const FailureOr< U > &  other)
inline

Definition at line 90 of file LogicalResult.h.

Member Function Documentation

◆ operator LogicalResult()

template<typename T>
mlir::FailureOr< T >::operator LogicalResult ( ) const
inline

Definition at line 93 of file LogicalResult.h.

References mlir::success().


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