mirror of
https://github.com/boostorg/system.git
synced 2025-08-01 05:24:26 +02:00
Return v_.index() == 1 from has_error() to avoid -Wmaybe-uninitialized in error()
This commit is contained in:
@@ -222,7 +222,7 @@ public:
|
|||||||
|
|
||||||
constexpr bool has_error() const noexcept
|
constexpr bool has_error() const noexcept
|
||||||
{
|
{
|
||||||
return v_.index() != 0;
|
return v_.index() == 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
constexpr explicit operator bool() const noexcept
|
constexpr explicit operator bool() const noexcept
|
||||||
@@ -511,7 +511,7 @@ public:
|
|||||||
|
|
||||||
constexpr bool has_error() const noexcept
|
constexpr bool has_error() const noexcept
|
||||||
{
|
{
|
||||||
return v_.index() != 0;
|
return v_.index() == 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
constexpr explicit operator bool() const noexcept
|
constexpr explicit operator bool() const noexcept
|
||||||
|
Reference in New Issue
Block a user