cuDDL
Loading...
Searching...
No Matches
Static Public Member Functions | List of all members
cuddl::Result< T > Struct Template Reference

Fallible API result: cuda::std::expected<T, Error> with cuDDL factories. More...

#include <error.hpp>

Inheritance diagram for cuddl::Result< T >:
[legend]
Collaboration diagram for cuddl::Result< T >:
[legend]

Static Public Member Functions

static Result ok (T value)
 
static Result err (Error error)
 

Detailed Description

template<typename T>
struct cuddl::Result< T >

Fallible API result: cuda::std::expected<T, Error> with cuDDL factories.

Layout-compatible with the base type. Inherits construction, operator*, operator->, value, error, and conversion from cuda::std::unexpected<Error>.

Definition at line 118 of file error.hpp.

Member Function Documentation

◆ err()

template<typename T >
static Result cuddl::Result< T >::err ( Error  error)
inlinestatic

Definition at line 125 of file error.hpp.

125 {
126 return Result(cuda::std::unexpect, std::move(error));
127 }

◆ ok()

template<typename T >
static Result cuddl::Result< T >::ok ( T  value)
inlinestatic

Definition at line 121 of file error.hpp.

121 {
122 return Result(std::move(value));
123 }
Here is the caller graph for this function:

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