MySQL 8.3.0
Source Code Documentation
expected.h File Reference
#include <functional>
#include <initializer_list>
#include <new>
#include <type_traits>
#include <utility>
#include "my_compiler.h"
#include "mysql/harness/stdx/type_traits.h"
#include <memory>

Go to the source code of this file.

Classes

struct  std::is_default_constructible< std::unique_ptr< T, void(*)(T *)> >
 
struct  stdx::unexpect_t
 
class  stdx::unexpected< E >
 
union  stdx::base::storage_t< T, E >
 
union  stdx::base::storage_t< void, E >
 specialized storage for <void, E>. More...
 
struct  stdx::base::default_ctor_base< bool >
 
struct  stdx::base::default_ctor_base< false >
 
struct  stdx::base::ctor_base< member_policy::none >
 
struct  stdx::base::ctor_base< member_policy::copy >
 
struct  stdx::base::ctor_base< member_policy::move >
 
struct  stdx::base::ctor_base< member_policy::move|member_policy::copy >
 
struct  stdx::base::assign_base< member_policy::none >
 
struct  stdx::base::assign_base< member_policy::copy >
 
struct  stdx::base::assign_base< member_policy::move >
 
struct  stdx::base::assign_base< member_policy::copy|member_policy::move >
 
class  stdx::ExpectedImplBase
 
class  stdx::ExpectedImpl< T, E >
 
class  stdx::ExpectedImpl< void, E >
 
struct  stdx::is_expected_impl< T >
 
struct  stdx::is_expected_impl< expected< T, E > >
 
class  stdx::expected< T, E >
 

Namespaces

namespace  std
 
namespace  stdx
 
namespace  stdx::base
 

Macros

#define RESO_ASSUME(x)
 

Typedefs

template<class B >
using stdx::base::not_ = std::negation< B >
 
template<class... B>
using stdx::base::and_ = std::conjunction< B... >
 
template<class... B>
using stdx::base::or_ = std::disjunction< B... >
 
template<class T , class E >
using stdx::base::select_ctor_base = ctor_base<(and_< or_< std::is_void< T >, std::is_copy_constructible< T > >, std::is_copy_constructible< E > >::value ? member_policy::copy :member_policy::none)|(and_< or_< std::is_void< T >, std::is_move_constructible< T > >, std::is_move_constructible< E > >::value ? member_policy::move :member_policy::none)>
 
template<class T , class E >
using stdx::base::select_assign_base = assign_base<(and_< or_< std::is_void< T >, and_< std::is_copy_constructible< T >, std::is_copy_assignable< T > > >, and_< std::is_copy_constructible< E >, std::is_copy_assignable< E > > >::value ? member_policy::copy :member_policy::none)|(or_< std::is_void< T >, and_< std::is_move_constructible< T >, std::is_move_assignable< T > > >::value ? member_policy::move :member_policy::none)>
 
template<class T >
using stdx::is_expected = is_expected_impl< std::decay_t< T > >
 

Enumerations

enum class  stdx::base::member_policy { stdx::base::none = 0 , stdx::base::copy = 1 << 1 , stdx::base::move = 1 << 2 }
 

Functions

template<typename E >
constexpr auto stdx::make_unexpected (E &&e) -> unexpected< std::decay_t< E > >
 
template<class E >
 stdx::unexpected (E) -> unexpected< E >
 
constexpr member_policy stdx::base::operator| (member_policy x, member_policy y)
 
template<class Exp , class Func , typename value_type = typename std::decay_t<Exp>::value_type, std::enable_if_t< std::is_void_v< value_type > ? std::is_invocable_v< Func > :std::is_invocable_v< Func, value_type > > * = nullptr>
constexpr auto stdx::base::and_then_impl (Exp &&exp, Func &&func)
 
template<class Exp , class Func , typename error_type = typename std::decay_t<Exp>::error_type, std::enable_if_t< std::is_invocable_v< Func, error_type > > * = nullptr>
constexpr auto stdx::base::or_else_impl (Exp &&exp, Func &&func)
 
template<class Exp , class Func >
constexpr auto stdx::expected_transform_impl (Exp &&exp, Func &&func)
 
template<class E1 , class E2 >
bool stdx::operator== (const unexpected< E1 > &a, const unexpected< E2 > &b)
 
template<class E1 , class E2 >
bool stdx::operator!= (const unexpected< E1 > &a, const unexpected< E2 > &b)
 
template<class T1 , class E1 , class T2 , class E2 >
bool stdx::operator== (const expected< T1, E1 > &a, const expected< T2, E2 > &b)
 
template<class E1 , class E2 >
bool stdx::operator== (const expected< void, E1 > &a, const expected< void, E2 > &b)
 
template<class T1 , class E1 , class T2 , class E2 >
bool stdx::operator!= (const expected< T1, E1 > &a, const expected< T2, E2 > &b)
 
template<class T1 , class E1 , class E2 >
bool stdx::operator== (const expected< T1, E1 > &a, const unexpected< E2 > &b)
 
template<class T1 , class E1 , class E2 >
bool stdx::operator== (const unexpected< E2 > &a, const expected< T1, E1 > &b)
 
template<class T1 , class E1 , class E2 >
bool stdx::operator!= (const expected< T1, E1 > &a, const unexpected< E2 > &b)
 
template<class T1 , class E1 , class E2 >
bool stdx::operator!= (const unexpected< E2 > &a, const expected< T1, E1 > &b)
 

Variables

constexpr unexpect_t stdx::unexpect {}
 

Macro Definition Documentation

◆ RESO_ASSUME

#define RESO_ASSUME (   x)
Value:
if (!(x)) { \
};