Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions include/outcome/policy/base.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ namespace policy
*/
template <class Impl> 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);
}
Expand All @@ -94,7 +94,7 @@ namespace policy
*/
template <class Impl> 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);
}
Expand All @@ -104,7 +104,7 @@ namespace policy
*/
template <class Impl> 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);
}
Expand Down