For grouping strings, "\3" and "\3\3" are equivalent.
Details
- Reviewers
Mordante • Quuxplusone - Group Reviewers
Restricted Project - Commits
- rG865c7ab421a6: [libcxx] [test] Fix moneypunct grouping tests on Windows
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
libcxx/test/std/localization/locale.categories/category.monetary/locale.moneypunct.byname/grouping.pass.cpp | ||
---|---|---|
93 | https://en.cppreference.com/w/cpp/locale/numpunct/grouping |
libcxx/test/std/localization/locale.categories/category.monetary/locale.moneypunct.byname/grouping.pass.cpp | ||
---|---|---|
93 | Like most of these things, I guess it’s pretty much passthrough from the OS’s locale data. I guess we could fix it up within the library, but I’m not sure if it’s worth it, if they’re both functionally equivalent anyway. |
LGTM!
libcxx/test/std/localization/locale.categories/category.monetary/locale.moneypunct.byname/grouping.pass.cpp | ||
---|---|---|
93 | Looking at my Linux system So these values have this value in the system's locale. |
https://en.cppreference.com/w/cpp/locale/numpunct/grouping
Geesh, this stuff is ridiculous. I buy how \3 and \3\3 are equivalent; but then my next question is, why does the existing code (on non-Windows) return \3\3? Is that due to something at the OS level that's out of our control, or is there some way that libc++ could fix it to sanely return a simple \3 like cppreference says it should?