C++ Actor Framework 0.19
Loading...
Searching...
No Matches
Public Types | Public Member Functions | List of all members
caf::expected< void > Class Reference

The pattern expected<void> shall be used for functions that may generate an error but would otherwise return bool. More...

#include <expected.hpp>

Inherited by caf::expected< unit_t >.

Public Types

using value_type = void
 
using error_type = caf::error
 
template<class U >
using rebind = expected< U >
 

Public Member Functions

template<class Enum , class = std::enable_if_t<is_error_code_enum_v<Enum>>>
 expected (Enum x)
 
 expected (unit_t) noexcept
 
 expected (caf::error err) noexcept
 
 expected (const expected &other)=default
 
 expected (expected &&other) noexcept=default
 
 expected (std::in_place_t)
 
expectedoperator= (const expected &other)=default
 
expectedoperator= (expected &&other) noexcept=default
 
expectedoperator= (caf::error err) noexcept
 
template<class Enum , class = std::enable_if_t<is_error_code_enum_v<Enum>>>
expectedoperator= (Enum code)
 
 operator bool () const noexcept
 Returns true if the object does not hold an error.
 
bool has_value () const noexcept
 Returns true if the object does not hold an error.
 
template<class... Args>
void emplace () noexcept
 
void swap (expected &other) noexcept
 
void value () const &
 
void value () &&
 
void operator* () const noexcept
 
caf::errorerror () &noexcept
 
const caf::errorerror () const &noexcept
 
caf::error && error () &&noexcept
 
const caf::error && error () const &&noexcept
 
template<class F >
auto and_then (F &&f) &
 
template<class F >
auto and_then (F &&f) &&
 
template<class F >
auto and_then (F &&f) const &
 
template<class F >
auto and_then (F &&f) const &&
 
template<class F >
expected or_else (F &&f) &
 
template<class F >
expected or_else (F &&f) &&
 
template<class F >
expected or_else (F &&f) const &
 
template<class F >
expected or_else (F &&f) const &&
 
template<class F >
auto transform (F &&f) &
 
template<class F >
auto transform (F &&f) &&
 
template<class F >
auto transform (F &&f) const &
 
template<class F >
auto transform (F &&f) const &&
 
template<class F >
expected transform_or (F &&f) &
 
template<class F >
expected transform_or (F &&f) &&
 
template<class F >
expected transform_or (F &&f) const &
 
template<class F >
expected transform_or (F &&f) const &&
 

Detailed Description

The pattern expected<void> shall be used for functions that may generate an error but would otherwise return bool.


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