forked from boostorg/system
Return v_.index() == 1 from has_error() to avoid -Wmaybe-uninitialized in error()
This commit is contained in:
1 parent
f2e1db8021
commit
cc7c2f7ee4
1 file changed
+2
-2
@@ -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
|
||||
|
||||
Reference in new issue
Block a user