26#ifndef MYSQL_HARNESS_STDX_EXPECTED_H_
27#define MYSQL_HARNESS_STDX_EXPECTED_H_
38#include <initializer_list>
46#if defined(__GNUC__) || defined(__clang__)
47#define RESO_ASSUME(x) \
48 if (!(x)) __builtin_unreachable();
49#elif defined(_MSC_VER)
50#define RESO_ASSUME(x) \
51 if (!(x)) __assume(0);
53#define RESO_ASSUME(x) \
90 static_assert(!std::is_same<E, void>::value,
"E must not be void");
108 std::enable_if_t<
std::is_constructible_v<E, Args &&...>> * =
nullptr>
110 error_(std::forward<Args>(args)...);
133template <
class T,
class E>
137template <
class T,
class E>
145 template <bool B = std::is_default_constructible<T>::value,
146 std::enable_if_t<B> * =
nullptr>
151 template <bool B = std::is_copy_constructible<T>::value,
152 std::enable_if_t<B> * =
nullptr>
157 template <bool B = std::is_move_constructible<T>::value,
158 std::enable_if_t<B> * =
nullptr>
164 template <
class... Args,
165 std::enable_if_t<std::is_constructible_v<T, Args &&...>,
void *> =
171 template <
class U,
class... Args,
172 std::enable_if_t<std::is_constructible_v<
173 T, std::initializer_list<U> &, Args &&...>,
190 std::enable_if_t<std::is_constructible_v<E, Args &&...>> * =
nullptr>
225 static_assert(!std::is_void<E>::value,
"E must not be void");
238 std::enable_if_t<std::is_constructible_v<E, Args &&...>> * =
nullptr>
240 new (&error_)
error_type(std::forward<Args>(args)...);
265 static_cast<int_type
>(y));
269template <
bool = true>
398template <class T, class E>
401 std::is_copy_constructible<E>>::value
405 std::is_move_constructible<E>>::value
414template <class T, class E>
418 and_<
std::is_copy_constructible<T>,
std::is_copy_assignable<T>>>,
419 and_<
std::is_copy_constructible<E>,
std::is_copy_assignable<E>>>::value
423 and_<
std::is_move_constructible<T>,
std::is_move_assignable<T>>>::value
432 : has_value_{has_value} {}
435 constexpr explicit operator bool() const noexcept {
return has_value(); }
440 swap(has_value_, other.has_value_);
447template <
class T,
class E>
454 template <bool B = std::is_default_constructible<T>::value,
455 std::enable_if_t<B> * =
nullptr>
457 storage_.construct_value();
460 template <
class UF,
class GF>
462 std::bool_constant<!std::is_convertible_v<UF, T> ||
463 !std::is_convertible_v<GF, E>>;
466 template <
class U,
class G,
class UF,
class GF>
468 std::is_constructible_v<T, UF> && std::is_constructible_v<E, GF> &&
469 !std::is_constructible_v<T, ExpectedImpl<U, G> &> &&
470 !std::is_constructible_v<T, ExpectedImpl<U, G>> &&
471 !std::is_constructible_v<T, const ExpectedImpl<U, G> &> &&
472 !std::is_constructible_v<T, const ExpectedImpl<U, G>> &&
473 !std::is_convertible_v<ExpectedImpl<U, G> &, T> &&
474 !std::is_convertible_v<ExpectedImpl<U, G>, T> &&
475 !std::is_convertible_v<const ExpectedImpl<U, G> &, T> &&
476 !std::is_convertible_v<const ExpectedImpl<U, G>, T> &&
483 class U,
class G,
class UF =
const U &,
class GF =
const G &,
484 std::enable_if_t<can_value_convert_construct<U, G, UF, GF>::value &&
489 storage_.construct_value(std::forward<UF>(*rhs));
491 storage_.construct_error(rhs.
error());
496 class U,
class G,
class UF =
const U &,
class GF =
const G &,
497 std::enable_if_t<can_value_convert_construct<U, G, UF, GF>::value &&
498 constructor_is_explicit<UF, GF>::value> * =
nullptr>
502 storage_.construct_value(std::forward<UF>(*rhs));
504 storage_.construct_error(rhs.
error());
509 class U,
class G,
class UF =
U,
class GF = G,
510 std::enable_if_t<can_value_convert_construct<U, G, UF, GF>::value &&
511 !constructor_is_explicit<UF, GF>::value> * =
nullptr>
514 if (rhs.has_value()) {
515 storage_.construct_value(std::forward<UF>(*rhs));
517 storage_.construct_error(rhs.error());
522 class U,
class G,
class UF =
U,
class GF = G,
523 std::enable_if_t<can_value_convert_construct<U, G, UF, GF>::value &&
524 constructor_is_explicit<UF, GF>::value> * =
nullptr>
527 if (rhs.has_value()) {
528 storage_.construct_value(std::forward<UF>(*rhs));
530 storage_.construct_error(rhs.error());
536 std::negation<std::is_same<std::in_place_t, stdx::remove_cvref_t<U>>>,
539 std::is_constructible<T, U>>;
543 std::negation<std::is_convertible<U, T>>;
545 template <
class U = T,
546 std::enable_if_t<can_construct_from_value_type<U>::value &&
550 storage_.construct_value(std::forward<U>(v));
553 template <
class U = T,
554 std::enable_if_t<can_construct_from_value_type<U>::value &&
555 can_construct_from_value_type_explicit<U>::value>
558 storage_.construct_value(std::in_place, std::forward<U>(v));
564 std::enable_if_t<std::is_constructible_v<T, Args &&...>> * =
nullptr>
567 storage_.construct_value(std::in_place, std::forward<Args>(args)...);
573 std::enable_if_t<std::is_constructible_v<E, Args &&...>> * =
nullptr>
576 storage_.construct_error(std::in_place, std::forward<Args>(args)...);
582 storage_.construct_value(other.
storage_.value());
584 storage_.construct_error(other.
storage_.error());
589 std::is_nothrow_move_constructible<E>::value
590 &&std::is_nothrow_move_constructible<T>::value)
593 storage_.construct_value(std::move(other.storage_.value()));
595 storage_.construct_error(std::move(other.storage_.error()));
600 std::enable_if_t<std::is_constructible_v<E, const G &>> * =
nullptr>
602 storage_.construct_error(e.
value());
606 std::enable_if_t<std::is_constructible_v<E, G>> * =
nullptr>
608 storage_.construct_error(std::move(e.value()));
623 template <
class U = T,
626 !std::conjunction_v<std::is_scalar<T>,
627 std::is_same<T, std::decay_t<U>>> &&
628 std::is_constructible_v<T, U> && std::is_assignable_v<T &, U>>
632 storage_.
value() = std::forward<U>(v);
643 storage_.destruct_value();
645 storage_.destruct_error();
650 template <
class U = T,
class G = E>
652#if defined(__cpp_lib_is_swappable)
653 std::is_swappable<U>::value && std::is_swappable<G>::value &&
655 (std::is_move_constructible<U>::value ||
656 std::is_move_constructible<G>::value)>
658 std::is_nothrow_move_constructible<T>::value
659 &&std::is_nothrow_move_constructible<E>::value
660#if defined(__cpp_lib_is_swappable)
661 &&std::is_nothrow_swappable<T &>::value
662 &&std::is_nothrow_swappable<E &>::value
667 if (
bool(*
this) && bool(other)) {
669 }
else if (!
bool(*
this) && !
bool(other)) {
671 }
else if (
bool(*
this) && !
bool(other)) {
675 other.
storage_.construct_value(std::move(storage_.value()));
676 storage_.destruct_value();
677 storage_.construct_error(std::move(t));
681 }
else if (!
bool(*
this) &&
bool(other)) {
690 return std::move(storage_.value());
699 return storage_.value();
704 return storage_.value();
710 return storage_.value_ptr();
715 return storage_.value_ptr();
720 static_assert(std::is_copy_constructible<T>::value &&
721 std::is_convertible<U &&, T>::value,
722 "T must be copy-constructible and convertible from U&&");
724 return has_value() ? **this :
static_cast<T
>(std::forward<U>(v));
729 static_assert(std::is_move_constructible<T>::value &&
730 std::is_convertible<U &&, T>::value,
731 "T must be move-constructible and convertible from U&&");
733 return has_value() ? std::move(**
this) :
static_cast<T
>(std::forward<U>(v));
739 return storage_.error();
743 return std::move(storage_.error());
747 return storage_.error();
751 return std::move(storage_.error());
775 std::enable_if_t<std::is_constructible_v<E, Args &&...>> * =
nullptr>
778 storage_.construct_error(std::in_place, std::forward<Args>(args)...);
784 storage_.construct_error(other.
storage_.error());
789 std::is_nothrow_move_constructible<E>::value)
792 storage_.construct_error(std::move(other.storage_.error()));
809 storage_.construct_error(e.
value());
813 storage_.construct_error(std::move(e.value()));
819 storage_.destruct_error();
824 template <
class G = E, std::enable_if_t<
825#if defined(__cpp_lib_is_swappable)
826 std::is_swappable<G>::value &&
828 std::is_move_constructible<G>::value,
831 std::is_nothrow_move_constructible<G>::value
832#if defined(__cpp_lib_is_swappable)
833 &&std::is_nothrow_swappable<G &>::value
838 if (
bool(*
this) && bool(other)) {
840 }
else if (!
bool(*
this) && !bool(other)) {
841 swap(storage_.error(), other.storage_.error());
842 }
else if (
bool(*
this) && !
bool(other)) {
845 storage_.construct_error(std::move(other.error()));
849 }
else if (!
bool(*
this) &&
bool(other)) {
857 return storage_.error();
861 return std::move(storage_.error());
865 return storage_.error();
869 return std::move(storage_.error());
883template <
class T,
class E>
892 class Exp,
class Func,
894 std::enable_if_t<std::is_void_v<value_type>
895 ? std::is_invocable_v<Func>
896 : std::is_invocable_v<Func, value_type>> * =
nullptr>
898 if constexpr (std::is_void_v<value_type>) {
899 using Ret = std::invoke_result_t<Func>;
902 "Func must return a stdx::expected<>");
904 if (exp.has_value()) {
905 return std::invoke(func);
910 using Ret = std::invoke_result_t<Func, value_type>;
913 "Func must return a stdx::expected<>");
915 if (exp.has_value()) {
916 return std::invoke(func, *std::forward<Exp>(exp));
923template <
class Exp,
class Func,
925 std::enable_if_t<std::is_invocable_v<Func, error_type>> * =
nullptr>
930 "Func must return an expected<>");
932 if (exp.has_value()) {
933 return std::forward<Exp>(exp);
936 return std::invoke(std::forward<Func>(func), std::forward<Exp>(exp).
error());
941template <
class T,
class E>
946 static_assert(!std::is_void<E>::value,
"E must not be void");
947 static_assert(!std::is_reference<T>::value,
"T must not be a reference");
948 static_assert(!std::is_same<T, std::remove_cv<std::in_place_t>>::value,
949 "T must not be std::in_place_t");
950 static_assert(!std::is_same<T, std::remove_cv<unexpected<E>>>::value,
951 "T must not be unexpected<E>");
952 static_assert(!std::is_reference<E>::value,
"E must not be a reference");
961 template <
class Func>
966 template <
class Func>
971 template <
class Func>
976 template <
class Func>
985 template <
class Func>
990 template <
class Func>
995 template <
class Func>
1000 template <
class Func>
1009 template <
class Func>
1014 template <
class Func>
1019 template <
class Func>
1024 template <
class Func>
1030template <
class Exp,
class Func>
1035 if constexpr (std::is_void_v<func_value_type>) {
1036 using func_return_type = std::invoke_result_t<Func>;
1040 if (!exp.has_value()) {
1041 return result_type{
stdx::unexpect, std::forward<Exp>(exp).error()};
1044 if constexpr (std::is_void_v<func_return_type>) {
1046 return result_type();
1048 return result_type(std::invoke(func));
1051 using func_return_type = std::invoke_result_t<Func, func_value_type>;
1055 if (!exp.has_value()) {
1056 return result_type{
stdx::unexpect, std::forward<Exp>(exp).error()};
1059 if constexpr (std::is_void_v<func_return_type>) {
1060 std::invoke(func, *std::forward<Exp>(exp));
1061 return result_type();
1063 return result_type(std::invoke(func, *std::forward<Exp>(exp)));
1068template <
class E1,
class E2>
1073template <
class E1,
class E2>
1078template <
class T1,
class E1,
class T2,
class E2>
1086template <
class E1,
class E2>
1095template <
class T1,
class E1,
class T2,
class E2>
1100template <
class T1,
class E1,
class E2>
1107template <
class T1,
class E1,
class E2>
1112template <
class T1,
class E1,
class E2>
1117template <
class T1,
class E1,
class E2>
Definition: expected.h:429
constexpr bool has_value() const
Definition: expected.h:434
bool has_value_
Definition: expected.h:444
void swap(ExpectedImplBase &other) noexcept
Definition: expected.h:437
constexpr ExpectedImplBase(bool has_value) noexcept
Definition: expected.h:431
base::storage_t< void, E > storage_
Definition: expected.h:877
constexpr ExpectedImpl(const ExpectedImpl &other)
Definition: expected.h:781
ExpectedImpl & operator=(ExpectedImpl const &other)
Definition: expected.h:796
constexpr ExpectedImpl() noexcept
Definition: expected.h:770
constexpr error_type && error() &&
Definition: expected.h:867
constexpr ExpectedImpl(unexpected< E > &&e)
Definition: expected.h:812
ExpectedImpl & operator=(ExpectedImpl &&other)
Definition: expected.h:802
void value_type
Definition: expected.h:766
constexpr ExpectedImpl(stdx::unexpect_t, Args &&... args)
Definition: expected.h:776
constexpr error_type & error() &
Definition: expected.h:863
constexpr unexpected_type get_unexpected() const
Definition: expected.h:872
constexpr ExpectedImpl(ExpectedImpl &&other) noexcept(std::is_nothrow_move_constructible< E >::value)
Definition: expected.h:788
constexpr const error_type && error() const &&
Definition: expected.h:859
constexpr const error_type & error() const &
Definition: expected.h:855
void swap(ExpectedImpl &other) noexcept(std::is_nothrow_move_constructible< G >::value)
Definition: expected.h:830
E error_type
Definition: expected.h:767
~ExpectedImpl()
Definition: expected.h:817
constexpr ExpectedImpl(const unexpected< E > &e)
Definition: expected.h:808
Definition: expected.h:448
std::enable_if_t<(std::is_move_constructible< U >::value||std::is_move_constructible< G >::value)> swap(ExpectedImpl &other) noexcept(std::is_nothrow_move_constructible< T >::value &&std::is_nothrow_move_constructible< E >::value)
Definition: expected.h:657
value_type & operator*() &
Definition: expected.h:696
constexpr ExpectedImpl(const unexpected< G > &e)
Definition: expected.h:601
value_type & value() &
Definition: expected.h:692
ExpectedImpl & operator=(ExpectedImpl &&other)
Definition: expected.h:617
std::bool_constant<!std::is_convertible_v< UF, T >||!std::is_convertible_v< GF, E > > constructor_is_explicit
Definition: expected.h:463
constexpr ExpectedImpl(std::in_place_t, Args &&... args)
Definition: expected.h:565
constexpr ExpectedImpl(const ExpectedImpl< U, G > &rhs)
Definition: expected.h:486
E error_type
Definition: expected.h:451
constexpr const value_type && value() const &&
Definition: expected.h:689
value_type * operator->()
Definition: expected.h:707
constexpr error_type & error() &
Definition: expected.h:745
constexpr ExpectedImpl(U &&v)
Definition: expected.h:549
ExpectedImpl & operator=(U &&v)
Definition: expected.h:630
std::conjunction< std::negation< std::is_same< std::in_place_t, stdx::remove_cvref_t< U > > >, std::negation< std::is_same< ExpectedImpl< T, E >, stdx::remove_cvref_t< U > > >, std::negation< std::is_same< unexpected< E >, stdx::remove_cvref_t< U > > >, std::is_constructible< T, U > > can_construct_from_value_type
Definition: expected.h:539
std::bool_constant< std::is_constructible_v< T, UF > &&std::is_constructible_v< E, GF > &&!std::is_constructible_v< T, ExpectedImpl< U, G > & > &&!std::is_constructible_v< T, ExpectedImpl< U, G > > &&!std::is_constructible_v< T, const ExpectedImpl< U, G > & > &&!std::is_constructible_v< T, const ExpectedImpl< U, G > > &&!std::is_convertible_v< ExpectedImpl< U, G > &, T > &&!std::is_convertible_v< ExpectedImpl< U, G >, T > &&!std::is_convertible_v< const ExpectedImpl< U, G > &, T > &&!std::is_convertible_v< const ExpectedImpl< U, G >, T > &&!std::is_constructible_v< unexpected< E >, ExpectedImpl< U, G > & > &&!std::is_constructible_v< unexpected< E >, ExpectedImpl< U, G > > &&!std::is_constructible_v< unexpected< E >, const ExpectedImpl< U, G > & > &&!std::is_constructible_v< unexpected< E >, const ExpectedImpl< U, G > > > can_value_convert_construct
Definition: expected.h:480
constexpr ExpectedImpl(ExpectedImpl &&other) noexcept(std::is_nothrow_move_constructible< E >::value &&std::is_nothrow_move_constructible< T >::value)
Definition: expected.h:588
constexpr value_type value_or(U &&v) &&
Definition: expected.h:728
constexpr ExpectedImpl(stdx::unexpect_t, Args &&... args)
Definition: expected.h:574
constexpr const error_type && error() const &&
Definition: expected.h:741
constexpr const value_type & value() const &
Definition: expected.h:688
constexpr value_type value_or(U &&v) const &
Definition: expected.h:719
constexpr const value_type & operator*() const &
Definition: expected.h:701
constexpr ExpectedImpl(ExpectedImpl< U, G > &&rhs)
Definition: expected.h:512
constexpr error_type && error() &&
Definition: expected.h:749
~ExpectedImpl()
Definition: expected.h:641
T value_type
Definition: expected.h:450
constexpr unexpected_type get_unexpected() const
Definition: expected.h:754
constexpr ExpectedImpl(const ExpectedImpl &other)
Definition: expected.h:579
constexpr const value_type * operator->() const
Definition: expected.h:712
ExpectedImpl & operator=(ExpectedImpl const &other)
Definition: expected.h:611
constexpr const error_type & error() const &
Definition: expected.h:737
constexpr ExpectedImpl()
Definition: expected.h:456
constexpr ExpectedImpl(unexpected< G > &&e)
Definition: expected.h:607
value_type && value() &&
Definition: expected.h:693
base::storage_t< T, E > storage_
Definition: expected.h:759
std::negation< std::is_convertible< U, T > > can_construct_from_value_type_explicit
Definition: expected.h:543
Definition: expected.h:944
constexpr auto or_else(Func &&func) &
Definition: expected.h:986
constexpr auto or_else(Func &&func) &&
Definition: expected.h:991
constexpr auto and_then(Func &&func) &&
Definition: expected.h:967
constexpr auto and_then(Func &&func) const &
Definition: expected.h:972
constexpr auto transform(Func &&func) &
Definition: expected.h:1010
constexpr auto transform(Func &&func) const &
Definition: expected.h:1020
constexpr auto transform(Func &&func) const &&
Definition: expected.h:1025
constexpr auto or_else(Func &&func) const &&
Definition: expected.h:1001
constexpr auto transform(Func &&func) &&
Definition: expected.h:1015
constexpr auto or_else(Func &&func) const &
Definition: expected.h:996
constexpr auto and_then(Func &&func) const &&
Definition: expected.h:977
constexpr auto and_then(Func &&func) &
Definition: expected.h:962
Definition: expected.h:88
constexpr error_type & value() &noexcept
Definition: expected.h:113
constexpr error_type && value() &&noexcept
Definition: expected.h:115
error_type error_
Definition: expected.h:121
constexpr unexpected(error_type &&e)
Definition: expected.h:96
constexpr const error_type & value() const &noexcept
Definition: expected.h:114
E error_type
Definition: expected.h:92
constexpr const error_type && value() const &&noexcept
Definition: expected.h:116
#define U
Definition: ctype-tis620.cc:75
error_type
Definition: error.h:36
#define RESO_ASSUME(x)
Definition: expected.h:53
Header for compiler-dependent features.
#define MY_COMPILER_GCC_DIAGNOSTIC_IGNORE(X)
Definition: my_compiler.h:261
#define MY_COMPILER_DIAGNOSTIC_PUSH()
save the compiler's diagnostic (enabled warnings, errors, ...) state
Definition: my_compiler.h:296
#define MY_COMPILER_DIAGNOSTIC_POP()
restore the compiler's diagnostic (enabled warnings, errors, ...) state
Definition: my_compiler.h:297
uint16_t value_type
Definition: vt100.h:184
Definition: gcs_xcom_synode.h:64
constexpr member_policy operator|(member_policy x, member_policy y)
Definition: expected.h:261
std::disjunction< B... > or_
Definition: expected.h:394
constexpr auto or_else_impl(Exp &&exp, Func &&func)
Definition: expected.h:926
constexpr auto and_then_impl(Exp &&exp, Func &&func)
Definition: expected.h:897
member_policy
Definition: expected.h:255
std::negation< B > not_
Definition: expected.h:388
std::conjunction< B... > and_
Definition: expected.h:391
bool operator!=(const unexpected< E1 > &a, const unexpected< E2 > &b)
Definition: expected.h:1074
constexpr auto expected_transform_impl(Exp &&exp, Func &&func)
Definition: expected.h:1031
constexpr unexpect_t unexpect
Definition: expected.h:85
constexpr auto make_unexpected(E &&e) -> unexpected< std::decay_t< E > >
Definition: expected.h:125
unexpected(E) -> unexpected< E >
typename remove_cvref< T >::type remove_cvref_t
Definition: type_traits.h:73
bool operator==(const unexpected< E1 > &a, const unexpected< E2 > &b)
Definition: expected.h:1069
std::conditional_t< !std::is_array< T >::value, std::unique_ptr< T, detail::Deleter< T > >, std::conditional_t< detail::is_unbounded_array_v< T >, std::unique_ptr< T, detail::Array_deleter< std::remove_extent_t< T > > >, void > > unique_ptr
The following is a common type that is returned by all the ut::make_unique (non-aligned) specializati...
Definition: ut0new.h:2438
required string type
Definition: replication_group_member_actions.proto:34
static void swap(String &a, String &b) noexcept
Definition: sql_string.h:642
constexpr assign_base() noexcept=default
constexpr assign_base() noexcept=default
constexpr assign_base() noexcept=default
constexpr assign_base() noexcept=default
Definition: expected.h:341
constexpr ctor_base() noexcept=default
constexpr ctor_base() noexcept=default
constexpr ctor_base() noexcept=default
constexpr ctor_base() noexcept=default
Definition: expected.h:293
constexpr default_ctor_base() noexcept=delete
Definition: expected.h:270
constexpr default_ctor_base() noexcept=default
Definition: expected.h:881
Definition: expected.h:81
specialized storage for <void, E>.
Definition: expected.h:221
error_type & error() &
Definition: expected.h:246
void construct_error(std::in_place_t, Args &&... args)
Definition: expected.h:239
constexpr const error_type && error() const &&
Definition: expected.h:247
void destruct_error()
Definition: expected.h:243
const error_type & error() const &
Definition: expected.h:245
void value_type
Definition: expected.h:222
constexpr error_type && error() &&
Definition: expected.h:248
E error_type
Definition: expected.h:223
error_type error_
Definition: expected.h:251
storage_t()
Definition: expected.h:227
void construct_error(error_type &&e)
Definition: expected.h:231
void construct_error(error_type const &e)
Definition: expected.h:230
~storage_t()
Definition: expected.h:228
Definition: expected.h:138
void construct_value(value_type &&e)
Definition: expected.h:159
constexpr const error_type && error() const &&
Definition: expected.h:206
error_type error_
Definition: expected.h:212
void construct_error(error_type &&e)
Definition: expected.h:183
void destruct_value()
Definition: expected.h:180
value_type & value() &
Definition: expected.h:199
void construct_value(value_type const &e)
Definition: expected.h:153
~storage_t()
Definition: expected.h:143
value_type * value_ptr()
Definition: expected.h:203
E error_type
Definition: expected.h:140
constexpr const value_type && value() const &&
Definition: expected.h:198
constexpr error_type & error() &
Definition: expected.h:207
constexpr const value_type & value() const &
Definition: expected.h:197
constexpr value_type && value() &&
Definition: expected.h:200
void construct_value()
Definition: expected.h:147
void construct_value(std::in_place_t, Args &&... args)
Definition: expected.h:167
void destruct_error()
Definition: expected.h:195
void construct_error(std::in_place_t, Args &&... args)
Definition: expected.h:191
T value_type
Definition: expected.h:139
value_type value_
Definition: expected.h:211
storage_t()
Definition: expected.h:142
void construct_error(error_type const &e)
Definition: expected.h:182
void construct_value(std::in_place_t, std::initializer_list< U > il, Args &&... args)
Definition: expected.h:175
const value_type * value_ptr() const
Definition: expected.h:202
constexpr error_type && error() &&
Definition: expected.h:208
constexpr const error_type & error() const &
Definition: expected.h:205