libzypp 17.36.7

Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | Private Member Functions | Private Attributes | List of all members
zyppng::expected< void, E > Class Template Reference

`#include <zypp-core/zyppng/pipelines/expected.h>`

## Public Types
using | value_type
using | error_type

## Public Member Functions
| ~expected ()
| expected (const expected &other)
| expected (expected &&other) noexcept
expected & | operator= (expected other)
void | swap (expected &other) noexcept
| operator bool () const
bool | is_valid () const
E & | error ()
const E & | error () const
void | unwrap () const
| expected (const expected &other)
| expected (expected &&other) noexcept
| ~expected ()
expected & | operator= (expected other)
void | swap (expected &other) noexcept
E & | error ()
const E & | error () const
| operator bool () const
bool | is_valid () const
void & | get ()
const void & | get () const
void & | unwrap ()
const void & | unwrap () const
void & | operator* ()
const void & | operator* () const
void * | operator-> ()
const void * | operator-> () const
void | visit (F f)

## Static Public Member Functions
static expected | success ()
template<typename... ConsParams>
static expected | error (ConsParams &&...params)
static expected | success (ConsParams &&...params)
static expected | error (ConsParams &&...params)

## Public Attributes
void | m_value
E | m_error

## Protected Member Functions
| expected ()

## Protected Attributes
union { |
T m_value |
E m_error |
}; |  |
bool | m_isValid

## Private Member Functions
| expected ()

## Private Attributes
union zyppng::expected< void, E >:: { ... } |
bool | m_isValid

## Detailed Description

template<typename E>
class zyppng::expected< void, E >

Definition at line 251 of file expected.h.

## Member Typedef Documentation

## ◆ value_type

using zyppng::expected< void, E >::value_type

Definition at line 42 of file expected.h.

## ◆ error_type

using zyppng::expected< void, E >::error_type

Definition at line 43 of file expected.h.

## Constructor & Destructor Documentation

## ◆ expected() [1/6]

template<typename E>

zyppng::expected< void, E >::expected | ( |  | ) |
| inline private

Definition at line 260 of file expected.h.

## ◆ ~expected() [1/2]

template<typename E>

zyppng::expected< void, E >::~expected | ( |  | ) |
| inline

Definition at line 263 of file expected.h.

## ◆ expected() [2/6]

template<typename E>

zyppng::expected< void, E >::expected | ( | const expected< void, E > & | other | ) |
| inline

Definition at line 272 of file expected.h.

## ◆ expected() [3/6]

template<typename E>

zyppng::expected< void, E >::expected | ( | expected< void, E > && | other | ) |
| inline noexcept

Definition at line 282 of file expected.h.

## ◆ expected() [4/6]

zyppng::expected< void, E >::expected | ( |  | ) |
| inline protected

Definition at line 36 of file expected.h.

## ◆ expected() [5/6]

zyppng::expected< void, E >::expected | ( | const expected< void, E > & | other | ) |
| inline

Definition at line 54 of file expected.h.

## ◆ expected() [6/6]

zyppng::expected< void, E >::expected | ( | expected< void, E > && | other | ) |
| inline noexcept

Definition at line 64 of file expected.h.

## ◆ ~expected() [2/2]

zyppng::expected< void, E >::~expected | ( |  | ) |
| inline

Definition at line 45 of file expected.h.

## Member Function Documentation

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

template<typename E>

expected & zyppng::expected< void, E >::operator= | ( | expected< void, E > | other | ) |
| inline

Definition at line 292 of file expected.h.

## ◆ swap() [1/2]

template<typename E>

void zyppng::expected< void, E >::swap | ( | expected< void, E > & | other | ) |
| inline noexcept

Definition at line 298 of file expected.h.

## ◆ success() [1/2]

template<typename E>

static expected zyppng::expected< void, E >::success | ( |  | ) |
| inline static

Definition at line 330 of file expected.h.

## ◆ error() [1/6]

template<typename E>
template<typename... ConsParams>

static expected zyppng::expected< void, E >::error | ( | ConsParams &&... | params | ) |
| inline static

Definition at line 341 of file expected.h.

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

template<typename E>

zyppng::expected< void, E >::operator bool | ( |  | ) | const
| inline

Definition at line 351 of file expected.h.

## ◆ is_valid() [1/2]

template<typename E>

bool zyppng::expected< void, E >::is_valid | ( |  | ) | const
| inline

Definition at line 356 of file expected.h.

## ◆ error() [2/6]

template<typename E>

E & zyppng::expected< void, E >::error | ( |  | ) |
| inline

Definition at line 367 of file expected.h.

## ◆ error() [3/6]

template<typename E>

const E & zyppng::expected< void, E >::error | ( |  | ) | const
| inline

Definition at line 373 of file expected.h.

## ◆ unwrap() [1/3]

template<typename E>

void zyppng::expected< void, E >::unwrap | ( |  | ) | const
| inline

Definition at line 379 of file expected.h.

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

expected & zyppng::expected< void, E >::operator= | ( | expected< void, E > | other | ) |
| inline

Definition at line 74 of file expected.h.

## ◆ swap() [2/2]

void zyppng::expected< void, E >::swap | ( | expected< void, E > & | other | ) |
| inline noexcept

Definition at line 80 of file expected.h.

## ◆ success() [2/2]

static expected zyppng::expected< void, E >::success | ( | ConsParams &&... | params | ) |
| inline static

Definition at line 115 of file expected.h.

## ◆ error() [4/6]

static expected zyppng::expected< void, E >::error | ( | ConsParams &&... | params | ) |
| inline static

Definition at line 126 of file expected.h.

## ◆ error() [5/6]

E & zyppng::expected< void, E >::error | ( |  | ) |
| inline

Definition at line 225 of file expected.h.

## ◆ error() [6/6]

const E & zyppng::expected< void, E >::error | ( |  | ) | const
| inline

Definition at line 231 of file expected.h.

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

zyppng::expected< void, E >::operator bool | ( |  | ) | const
| inline

Definition at line 136 of file expected.h.

## ◆ is_valid() [2/2]

bool zyppng::expected< void, E >::is_valid | ( |  | ) | const
| inline

Definition at line 141 of file expected.h.

## ◆ get() [1/2]

void & zyppng::expected< void, E >::get | ( |  | ) |
| inline

Definition at line 152 of file expected.h.

## ◆ get() [2/2]

const void & zyppng::expected< void, E >::get | ( |  | ) | const
| inline

Definition at line 158 of file expected.h.

## ◆ unwrap() [2/3]

void & zyppng::expected< void, E >::unwrap | ( |  | ) |
| inline

Unwraps the value if the expected is valid, otherwise throws an exception. If the Error type is std::exception_ptr the exception will be rethrown, otherwise the Error object is directly thrown as if calling:

expected<int,MyError> test = functionReturningError();
throw test.error();
zyppng::expected< void, E >::expected
expected()
Definition expected.h:260
zyppng::expected::error
static expected error(ConsParams &&...params)
Definition expected.h:126

Definition at line 173 of file expected.h.

## ◆ unwrap() [3/3]

const void & zyppng::expected< void, E >::unwrap | ( |  | ) | const
| inline

Definition at line 189 of file expected.h.

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

void & zyppng::expected< void, E >::operator* | ( |  | ) |
| inline

Definition at line 205 of file expected.h.

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

const void & zyppng::expected< void, E >::operator* | ( |  | ) | const
| inline

Definition at line 210 of file expected.h.

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

void * zyppng::expected< void, E >::operator-> | ( |  | ) |
| inline

Definition at line 215 of file expected.h.

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

const void * zyppng::expected< void, E >::operator-> | ( |  | ) | const
| inline

Definition at line 220 of file expected.h.

## ◆ visit()

void zyppng::expected< void, E >::visit | ( | F | f | ) |
| inline

Definition at line 240 of file expected.h.

## Member Data Documentation

## ◆ m_value [1/2]

template<typename E>

void* zyppng::expected< void, E >::m_value

Definition at line 254 of file expected.h.

## ◆ m_error [1/2]

template<typename E>

E zyppng::expected< void, E >::m_error

Definition at line 255 of file expected.h.

## ◆ []

union zyppng::expected< void, E > { ... } zyppng::expected< void, E >

## ◆ m_isValid [1/2]

template<typename E>

bool zyppng::expected< void, E >::m_isValid
| private

Definition at line 258 of file expected.h.

## ◆ m_value [2/2]

void zyppng::expected< void, E >::m_value

Definition at line 30 of file expected.h.

## ◆ m_error [2/2]

E zyppng::expected< void, E >::m_error

Definition at line 31 of file expected.h.

## ◆ [union]

union { ... } zyppng::expected< void, E >

## ◆ m_isValid [2/2]

bool zyppng::expected< void, E >::m_isValid
| protected

Definition at line 34 of file expected.h.

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

- zypp-core/zyppng/pipelines/expected.h