[libcxx-commits] [libcxx] [libc++] LWG2381: Inconsistency in parsing floating point numbers (PR #77948)

A. Jiang via libcxx-commits libcxx-commits at lists.llvm.org
Mon Apr 8 10:14:48 PDT 2024


================
@@ -176,9 +182,9 @@ 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.0);
     }
----------------
frederick-vs-ja wrote:

> Can you also test with "p00", "+p00", "-p00" and similar for "P00", "e00", and "E00"?

These cases are now fixed.

https://github.com/llvm/llvm-project/pull/77948


More information about the libcxx-commits mailing list