| Tilt Five NDK |

Public Types | Public Member Functions
tiltfive::Result< T > Class Template Reference

Templated return type with support for error conditions. More...

`#include <result.hpp>`

Collaboration diagram for tiltfive::Result< T >:
[legend]

## Public Types
using | Value = T

## Public Member Functions
| Result (Value &&value) noexcept
| Result (const Value &value)
| Result (std::error_code err) noexcept
| Result (Result &&other)
| Result (const Result &other) noexcept
template<typename ErrorCodeEnum , typename = typename std::enable_if<std::is_error_code_enum<ErrorCodeEnum>::value>::type>
| Result (ErrorCodeEnum err) noexcept
| Result (std::errc err) noexcept
auto | operator= (Result &&other) noexcept -> Result &
auto | operator= (const Result &other) -> Result &
| operator bool () const noexcept
auto | operator* () -> Value &
auto | operator* () const -> const Value &
auto | operator-> () -> Value *
auto | operator-> () const -> const Value *
auto | error () const noexcept -> std::error_code
auto | logged () const noexcept -> bool
auto | skipped () const noexcept -> bool

## Detailed Description

template<typename T>
class tiltfive::Result< T >

Templated return type with support for error conditions.

Definition at line 37 of file result.hpp.

## Member Typedef Documentation

## ◆ Value

template<typename T >

using tiltfive::Result< T >::Value = T

Definition at line 39 of file result.hpp.

## Constructor & Destructor Documentation

## ◆ Result() [1/7]

template<typename T >

tiltfive::Result< T >::Result | ( | Value && | value | ) |
| inline noexcept

Definition at line 41 of file result.hpp.

## ◆ Result() [2/7]

template<typename T >

tiltfive::Result< T >::Result | ( | const Value & | value | ) |
| inline

Definition at line 43 of file result.hpp.

## ◆ Result() [3/7]

template<typename T >

tiltfive::Result< T >::Result | ( | std::error_code | err | ) |
| inline noexcept

Definition at line 45 of file result.hpp.

## ◆ Result() [4/7]

template<typename T >

tiltfive::Result< T >::Result | ( | Result< T > && | other | ) |
| inline

Definition at line 47 of file result.hpp.

## ◆ Result() [5/7]

template<typename T >

tiltfive::Result< T >::Result | ( | const Result< T > & | other | ) |
| inline noexcept

Definition at line 55 of file result.hpp.

## ◆ Result() [6/7]

template<typename T >
template<typename ErrorCodeEnum , typename = typename std::enable_if<std::is_error_code_enum<ErrorCodeEnum>::value>::type>

tiltfive::Result< T >::Result | ( | ErrorCodeEnum | err | ) |
| inline noexcept

Definition at line 66 of file result.hpp.

## ◆ Result() [7/7]

template<typename T >

tiltfive::Result< T >::Result | ( | std::errc | err | ) |
| inline noexcept

Definition at line 68 of file result.hpp.

## ◆ ~Result()

template<typename T >

tiltfive::Result< T >::~Result | ( |  | ) |
| inline

Definition at line 70 of file result.hpp.

## Member Function Documentation

## ◆ error()

template<typename T >

auto tiltfive::Result< T >::error | ( |  | ) | const -> std::error_code
| inline noexcept

Definition at line 153 of file result.hpp.

## ◆ logged()

template<typename T >

auto tiltfive::Result< T >::logged | ( |  | ) | const -> bool
| inline noexcept

Definition at line 160 of file result.hpp.

## ◆ operator bool()

template<typename T >

tiltfive::Result< T >::operator bool | ( |  | ) | const
| inline explicit noexcept

Definition at line 121 of file result.hpp.

## ◆ operator*() [1/2]

template<typename T >

auto tiltfive::Result< T >::operator* | ( |  | ) | -> Value&
| inline

Definition at line 125 of file result.hpp.

## ◆ operator*() [2/2]

template<typename T >

auto tiltfive::Result< T >::operator* | ( |  | ) | const -> const Value&
| inline

Definition at line 132 of file result.hpp.

## ◆ operator->() [1/2]

template<typename T >

auto tiltfive::Result< T >::operator-> | ( |  | ) | -> Value*
| inline

Definition at line 139 of file result.hpp.

## ◆ operator->() [2/2]

template<typename T >

auto tiltfive::Result< T >::operator-> | ( |  | ) | const -> const Value*
| inline

Definition at line 146 of file result.hpp.

## ◆ operator=() [1/2]

template<typename T >

auto tiltfive::Result< T >::operator= | ( | const Result< T > & | other | ) | -> Result&
| inline

Definition at line 100 of file result.hpp.

## ◆ operator=() [2/2]

template<typename T >

auto tiltfive::Result< T >::operator= | ( | Result< T > && | other | ) | -> Result&
| inline noexcept

Definition at line 79 of file result.hpp.

## ◆ skipped()

template<typename T >

auto tiltfive::Result< T >::skipped | ( |  | ) | const -> bool
| inline noexcept

Definition at line 164 of file result.hpp.

## Field Documentation

## ◆ mErr

template<typename T >

std::error_code tiltfive::Result< T >::mErr

Definition at line 179 of file result.hpp.

## ◆ mValue

template<typename T >

Value tiltfive::Result< T >::mValue

Definition at line 178 of file result.hpp.

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

- result.hpp