ThreadSchedule 4.1.0
Modern C++ thread management library
Loading...
Searching...
No Matches
expected.hpp File Reference

Stable library-owned expected implementation for ThreadSchedule APIs. More...

#include "detail/lifetime.hpp"
#include <cstddef>
#include <exception>
#include <functional>
#include <initializer_list>
#include <memory>
#include <optional>
#include <system_error>
#include <type_traits>
#include <utility>
#include <variant>
Include dependency graph for expected.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  threadschedule::unexpect_t
class  threadschedule::unexpected< E >
class  threadschedule::expected< T, E >
class  threadschedule::detail::expected_void< T, E >
class  threadschedule::expected< void, E >
class  threadschedule::expected< const void, E >
class  threadschedule::expected< volatile void, E >
class  threadschedule::expected< const volatile void, E >

Namespaces

namespace  threadschedule
namespace  threadschedule::detail
 Aggregates multiple thread_registry_backend instances into a single queryable view.

Macros

#define THREADSCHEDULE_HAS_STD_EXPECTED   0
#define THREADSCHEDULE_EXPECTED_THROW(ex)
#define THREADSCHEDULE_EXPECTED_EXCEPTION_CONSTEXPR

Typedefs

template<typename T>
using threadschedule::detail::expected_remove_cvref_t = std::remove_cv_t<std::remove_reference_t<T>>

Functions

template<typename E>
 threadschedule::unexpected (E) -> unexpected< E >
template<typename T, typename E, typename T2, std::enable_if_t<!detail::is_expected_v< T2 > &&!detail::is_unexpected_v< T2 > &&!std::is_void_v< T >, int > = 0, std::enable_if_t< detail::expected_equality_comparable_v< T, T2 >, int > = 0>
constexpr auto threadschedule::operator== (expected< T, E > const &lhs, T2 const &rhs) -> bool
template<typename T, typename E, typename T2, std::enable_if_t<!detail::is_expected_v< T2 > &&!detail::is_unexpected_v< T2 > &&!std::is_void_v< T >, int > = 0, std::enable_if_t< detail::expected_equality_comparable_v< T, T2 >, int > = 0>
constexpr auto threadschedule::operator== (T2 const &lhs, expected< T, E > const &rhs) -> bool
template<typename T, typename E, typename T2, std::enable_if_t<!detail::is_expected_v< T2 > &&!detail::is_unexpected_v< T2 > &&!std::is_void_v< T >, int > = 0, std::enable_if_t< detail::expected_equality_comparable_v< T, T2 >, int > = 0>
constexpr auto threadschedule::operator!= (expected< T, E > const &lhs, T2 const &rhs) -> bool
template<typename T, typename E, typename T2, std::enable_if_t<!detail::is_expected_v< T2 > &&!detail::is_unexpected_v< T2 > &&!std::is_void_v< T >, int > = 0, std::enable_if_t< detail::expected_equality_comparable_v< T, T2 >, int > = 0>
constexpr auto threadschedule::operator!= (T2 const &lhs, expected< T, E > const &rhs) -> bool
template<typename T, typename E>
constexpr auto threadschedule::swap (expected< T, E > &lhs, expected< T, E > &rhs) noexcept(noexcept(lhs.swap(rhs))) -> decltype(lhs.swap(rhs))

Variables

constexpr unexpect_t threadschedule::unexpect {}
template<typename>
constexpr bool threadschedule::detail::is_unexpected_v = false
template<typename E>
constexpr bool threadschedule::detail::is_unexpected_v< unexpected< E > > = true
template<typename E>
constexpr bool threadschedule::detail::valid_expected_error_v

Detailed Description

Stable library-owned expected implementation for ThreadSchedule APIs.

Definition in file expected.hpp.

Macro Definition Documentation

◆ THREADSCHEDULE_EXPECTED_EXCEPTION_CONSTEXPR

#define THREADSCHEDULE_EXPECTED_EXCEPTION_CONSTEXPR

Definition at line 43 of file expected.hpp.

◆ THREADSCHEDULE_EXPECTED_THROW

◆ THREADSCHEDULE_HAS_STD_EXPECTED

#define THREADSCHEDULE_HAS_STD_EXPECTED   0

Definition at line 31 of file expected.hpp.