diff --git a/include/boost/system/result.hpp b/include/boost/system/result.hpp index 4e6c00c..2e0ddc3 100644 --- a/include/boost/system/result.hpp +++ b/include/boost/system/result.hpp @@ -222,7 +222,7 @@ public: constexpr bool has_error() const noexcept { - return v_.index() != 0; + return v_.index() == 1; } constexpr explicit operator bool() const noexcept @@ -511,7 +511,7 @@ public: constexpr bool has_error() const noexcept { - return v_.index() != 0; + return v_.index() == 1; } constexpr explicit operator bool() const noexcept