diff --git a/include/outcome/policy/base.hpp b/include/outcome/policy/base.hpp index 28b6ecd61f2..d49f71f619a 100644 --- a/include/outcome/policy/base.hpp +++ b/include/outcome/policy/base.hpp @@ -84,7 +84,7 @@ namespace policy */ template static constexpr void narrow_value_check(Impl &&self) noexcept { - if((self._state._status & OUTCOME_V2_NAMESPACE::detail::status_have_value) == 0) + if(!_has_value(self)) { _ub(self); } @@ -94,7 +94,7 @@ namespace policy */ template static constexpr void narrow_error_check(Impl &&self) noexcept { - if((self._state._status & OUTCOME_V2_NAMESPACE::detail::status_have_error) == 0) + if(!_has_error(self)) { _ub(self); } @@ -104,7 +104,7 @@ namespace policy */ template static constexpr void narrow_exception_check(Impl &&self) noexcept { - if((self._state._status & OUTCOME_V2_NAMESPACE::detail::status_have_exception) == 0) + if(!_has_exception(self)) { _ub(self); }