template <class Impl> static constexpr void wide_error_check(Impl &&self) { if(!base::_has_error(std::forward<Impl>(self))) { OUTCOME_THROW_EXCEPTION(bad_result_access("no error")); // NOLINT } }
template <class Impl> static constexpr void wide_value_check(Impl &&self) { if(!base::_has_value(std::forward<Impl>(self))) { if(base::_has_error(std::forward<Impl>(self))) { // ADL discovered outcome_throw_as_system_error_with_payload(base::_error(std::forward<Impl>(self))); } OUTCOME_THROW_EXCEPTION(bad_result_access("no value")); // NOLINT } }
template <class Impl> static constexpr void wide_value_check(Impl &&self) { if(!base::_has_value(std::forward<Impl>(self))) { if(base::_has_error(std::forward<Impl>(self))) { // ADL rethrow_exception(policy::exception_ptr(base::_error(std::forward<Impl>(self)))); } BOOST_OUTCOME_THROW_EXCEPTION(bad_result_access("no value")); // NOLINT } }