bitwise on boolean
This commit is contained in:
parent
f68024543f
commit
7fc409eecc
@ -784,8 +784,8 @@ inline std::istream& ParseNormalFloat(std::istream& is, bool negate_value,
|
|||||||
if (val.isInfinity()) {
|
if (val.isInfinity()) {
|
||||||
// Fail the parse. Emulate standard behaviour by setting the value to
|
// Fail the parse. Emulate standard behaviour by setting the value to
|
||||||
// the closest normal value, and set the fail bit on the stream.
|
// the closest normal value, and set the fail bit on the stream.
|
||||||
value.set_value((value.isNegative() | negate_value) ? T::lowest()
|
value.set_value((value.isNegative() || negate_value) ? T::lowest()
|
||||||
: T::max());
|
: T::max());
|
||||||
is.setstate(std::ios_base::failbit);
|
is.setstate(std::ios_base::failbit);
|
||||||
}
|
}
|
||||||
return is;
|
return is;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user