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

Mark de Wever via libcxx-commits libcxx-commits at lists.llvm.org
Sun Apr 7 04:42:34 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);
     }
----------------
mordante wrote:

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

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


More information about the libcxx-commits mailing list