Template Class result_impl< OkType, ErrType, OkResultType, ErrResultType >

Class Documentation

template<class T, class... Any = = 0> legion::core::common::result_impl< OkType, ErrType, OkResultType, ErrResultType >

Public Types

using err_type = ErrType
using ok_type = OkType
using err_result_t = ErrResultType
using ok_result_t = OkResultType

Public Functions

inline result_impl(std::unique_ptr<ok_type> ok, std::unique_ptr<err_type> err)
result_impl(const result_impl&) = delete
result_impl(result_impl&&) noexcept = default
result_impl &operator=(const result_impl&) = delete
result_impl &operator=(result_impl&&) noexcept = default
virtual ~result_impl() = default
inline try_static_cast_result<ok_result_t, ok_type>::type get()
inline operator typename try_static_cast_result<ok_result_t, ok_type>::type()
inline operator typename try_static_cast_result<ok_result_t, ok_type>::type() const
template<class Func, class ...Args>
inline auto except(Func &&f, Args&&... args) -> decltype(auto)
template<class Func, class ...Args>
inline auto except(const Func &f, Args&&... args) -> decltype(auto)
inline bool valid() const noexcept
inline bool has_err() noexcept
inline const try_static_cast_result<err_result_t, err_type>::type &get_error() const
inline try_static_cast_result<err_result_t, err_type>::type get_error()
inline void rethrow()
inline void maybe_rethrow()

Protected Attributes

std::unique_ptr<err_type> m_err
std::unique_ptr<ok_type> m_ok