fpromise::result

Summary

Constructors and Destructors

result()
result(pending_result)
result(ok_result< V > result)
result(ok_result< OtherV > other)
result(error_result< E > result)
result(error_result< OtherE > other)
result(const result & other)
result(result && other)
~result()

Public types

error_type using
E
value_type using
V

Public functions

error()
constexpr R &
error() const
constexpr const R &
is_error() const
constexpr bool
is_ok() const
constexpr bool
is_pending() const
constexpr bool
operator bool() const
constexpr
operator=(const result & other)=default
result &
operator=(result && other)
result &
state() const
constexpr result_state
swap(result & other)
void
take_error()
R
take_error_result()
take_ok_result()
ok_result< V >
take_value()
R
value()
constexpr R &
value() const
constexpr const R &

Public types

error_type

E error_type

value_type

V value_type

Public functions

error

constexpr R & error()

error

constexpr const R & error() const 

is_error

constexpr bool is_error() const 

is_ok

constexpr bool is_ok() const 

is_pending

constexpr bool is_pending() const 

operator bool

constexpr operator bool() const 

operator=

result & operator=(
  const result & other
)=default

operator=

result & operator=(
  result && other
)

result

constexpr result()=default

result

constexpr result(
  pending_result
)

result

constexpr result(
  ok_result< V > result
)

result

constexpr result(
  ok_result< OtherV > other
)

result

constexpr result(
  error_result< E > result
)

result

constexpr result(
  error_result< OtherE > other
)

result

 result(
  const result & other
)=default

result

 result(
  result && other
) noexcept

state

constexpr result_state state() const 

swap

void swap(
  result & other
)

take_error

R take_error()

take_error_result

error_result< E > take_error_result()

take_ok_result

ok_result< V > take_ok_result()

take_value

R take_value()

value

constexpr R & value()

value

constexpr const R & value() const 

~result

 ~result()=default