50 template <
class Err = E>
73template <
class T,
class E = dberr_t>
81 : std::variant<T, E>(std::move(other)) {}
83 template <
typename U = std::remove_cv_t<T>>
85 : std::variant<T, E>(std::in_place_index<0>, std::forward<U>(u)) {}
93 return &std::get<0>(*
this);
98 return &std::get<0>(*
this);
103 return std::get<0>(*
this);
106 constexpr T &
operator*() &
noexcept {
return std::get<0>(*
this); }
109 return std::move(std::get<0>(*
this));
112 constexpr T &&
operator*() &&
noexcept {
return std::move(std::get<0>(*
this)); }
120 return std::get<0>(*
this);
125 return std::get<0>(*
this);
130 return std::move(std::get<0>(*
this));
135 return std::move(std::get<0>(*
this));
140 return std::get<1>(*
this);
145 return std::get<1>(*
this);
150 return std::move(std::get<1>(*
this));
155 return std::move(std::get<1>(*
this));
C++23 std::expected.
Definition: ut0expected.h:74
constexpr const T * operator->() const noexcept
Definition: ut0expected.h:91
constexpr T & value() &
Definition: ut0expected.h:123
constexpr const E & error() const &noexcept
Definition: ut0expected.h:138
E error_type
Definition: ut0expected.h:77
constexpr const E && error() const &&noexcept
Definition: ut0expected.h:148
T value_type
Definition: ut0expected.h:76
constexpr T & operator*() &noexcept
Definition: ut0expected.h:106
constexpr T && operator*() &&noexcept
Definition: ut0expected.h:112
constexpr const T && operator*() const &&noexcept
Definition: ut0expected.h:108
constexpr T * operator->() noexcept
Definition: ut0expected.h:96
constexpr Expected(Expected &&other) noexcept
Definition: ut0expected.h:80
constexpr Expected(Unexpected< U > &&u)
Definition: ut0expected.h:88
constexpr E && error() &&noexcept
Definition: ut0expected.h:153
constexpr const T & operator*() const &noexcept
Definition: ut0expected.h:101
constexpr E & error() &noexcept
Definition: ut0expected.h:143
constexpr T && value() &&
Definition: ut0expected.h:133
constexpr const T && value() const &&
Definition: ut0expected.h:128
constexpr const T & value() const &
Definition: ut0expected.h:118
constexpr bool has_value() const noexcept
Definition: ut0expected.h:116
C++23 std::unexpected.
Definition: ut0expected.h:48
constexpr Unexpected(Err &&e)
Definition: ut0expected.h:51
constexpr E && error() &&noexcept
Definition: ut0expected.h:59
constexpr E & error() &noexcept
Definition: ut0expected.h:55
E m_error
Definition: ut0expected.h:62
constexpr const E && error() const &&noexcept
Definition: ut0expected.h:57
constexpr const E & error() const &noexcept
Definition: ut0expected.h:53
Global error codes for the database.
#define T
Definition: jit_executor_value.cc:373
bool index(const std::string &value, const String &search_for, uint32_t *idx)
Definition: contains.h:76
noexcept
The return type for any call_and_catch(f, args...) call where f(args...) returns Type.
Definition: call_and_catch.h:76
Define std::hash<Gtid>.
Definition: gtid.h:355
This file contains a set of libraries providing overloads for regular dynamic allocation routines whi...
Definition: aligned_alloc.h:48
Unexpected(E) -> Unexpected< E >
Debug utilities for Innobase.
#define ut_a(EXPR)
Abort execution if EXPR does not evaluate to nonzero.
Definition: ut0dbg.h:97