[libcxx-commits] [PATCH] D100005: [libc++] Use the more precise constructor for char_type in std::num_get::do_get.

Marek Kurdej via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Wed Apr 7 00:23:27 PDT 2021


curdeius added a comment.

Could you please minimize your example (if possible) and make a test out of it, please?

Have you, by any chance, found the part of standard that requires the standard library to accept it?



================
Comment at: libcxx/include/locale:1072
     char_type __atoms[26];
-    char_type __thousands_sep = 0;
+    char_type __thousands_sep = '\x00';
     string __grouping;
----------------
Wouldn't this be more generic?

I doubt that `char_type` must be constructible from `char` (at least, no more than from `int`).
And I guess that a type that is not default-initializable would fail in other places anyway.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D100005/new/

https://reviews.llvm.org/D100005



More information about the libcxx-commits mailing list