[libcxx-commits] [libcxx] [libc++] LWG2381: Inconsistency in parsing floating point numbers (PR #77948)
A. Jiang via libcxx-commits
libcxx-commits at lists.llvm.org
Fri Jan 12 15:45:52 PST 2024
================
@@ -165,10 +166,11 @@ int main(int, char**)
f.get(cpp17_input_iterator<const char*>(str),
cpp17_input_iterator<const char*>(str+sizeof(str)),
ios, err, v);
- assert(base(iter) == str+sizeof(str)-1);
- assert(err == ios.goodbit);
- assert(std::isnan(v));
+ assert(base(iter) == str);
+ assert(err == ios.failbit);
+ assert(v == 0.0l);
}
+#if LDBL_MANT_DIG >= 64
----------------
frederick-vs-ja wrote:
Thanks for the correction. I've verified that `1.189731495357231765021264e+49321` and `1.189731495357231765021264e+49329` consistently result in infinity on MSVC, so perhaps these cases shouldn't be guarded.
https://github.com/llvm/llvm-project/pull/77948
More information about the libcxx-commits
mailing list