[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 01:04:50 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:

I'll try to fix the checking for the leading sign and digit. But there'rs still non-trivial issues, which perhaps should be fixed in another PR. Reported #87969.

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


More information about the libcxx-commits mailing list