[libcxx-commits] [libcxx] c4dafb0 - [libc++] Mark LWG4084 as resolved (#206224)
via libcxx-commits
libcxx-commits at lists.llvm.org
Mon Jun 29 05:33:10 PDT 2026
Author: Connector Switch
Date: 2026-06-29T20:33:06+08:00
New Revision: c4dafb0c3bda13f40ded1e0f3f018dd5ec529fbb
URL: https://github.com/llvm/llvm-project/commit/c4dafb0c3bda13f40ded1e0f3f018dd5ec529fbb
DIFF: https://github.com/llvm/llvm-project/commit/c4dafb0c3bda13f40ded1e0f3f018dd5ec529fbb.diff
LOG: [libc++] Mark LWG4084 as resolved (#206224)
Closes https://github.com/llvm/llvm-project/issues/118346
Added:
Modified:
libcxx/docs/Status/Cxx26Issues.csv
libcxx/test/std/localization/locale.categories/category.numeric/locale.nm.put/facet.num.put.members/put_double.pass.cpp
libcxx/test/std/localization/locale.categories/category.numeric/locale.nm.put/facet.num.put.members/put_long_double.pass.cpp
Removed:
################################################################################
diff --git a/libcxx/docs/Status/Cxx26Issues.csv b/libcxx/docs/Status/Cxx26Issues.csv
index d4f7a44910e00..9b764f2c32377 100644
--- a/libcxx/docs/Status/Cxx26Issues.csv
+++ b/libcxx/docs/Status/Cxx26Issues.csv
@@ -88,7 +88,7 @@
"`LWG4044 <https://wg21.link/LWG4044>`__","Confusing requirements for ``std::print`` on POSIX platforms","2024-11 (Wrocław)","","","`#118343 <https://github.com/llvm/llvm-project/issues/118343>`__",""
"`LWG4064 <https://wg21.link/LWG4064>`__","Clarify that ``std::launder`` is not needed when using the result of ``std::memcpy``","2024-11 (Wrocław)","","","`#118344 <https://github.com/llvm/llvm-project/issues/118344>`__",""
"`LWG4072 <https://wg21.link/LWG4072>`__","``std::optional`` comparisons: constrain harder","2024-11 (Wrocław)","","","`#118345 <https://github.com/llvm/llvm-project/issues/118345>`__",""
-"`LWG4084 <https://wg21.link/LWG4084>`__","``std::fixed`` ignores ``std::uppercase``","2024-11 (Wrocław)","","","`#118346 <https://github.com/llvm/llvm-project/issues/118346>`__",""
+"`LWG4084 <https://wg21.link/LWG4084>`__","``std::fixed`` ignores ``std::uppercase``","2024-11 (Wrocław)","|Complete|","","`#118346 <https://github.com/llvm/llvm-project/issues/118346>`__",""
"`LWG4085 <https://wg21.link/LWG4085>`__","``ranges::generate_random``'s helper lambda should specify the return type","2024-11 (Wrocław)","","","`#118347 <https://github.com/llvm/llvm-project/issues/118347>`__",""
"`LWG4088 <https://wg21.link/LWG4088>`__","``println`` ignores the locale imbued in ``std::ostream``","2024-11 (Wrocław)","|Complete|","18","`#118348 <https://github.com/llvm/llvm-project/issues/118348>`__",""
"`LWG4112 <https://wg21.link/LWG4112>`__","``has-arrow`` should required ``operator->()`` to be ``const``-qualified","2024-11 (Wrocław)","","","`#118349 <https://github.com/llvm/llvm-project/issues/118349>`__",""
diff --git a/libcxx/test/std/localization/locale.categories/category.numeric/locale.nm.put/facet.num.put.members/put_double.pass.cpp b/libcxx/test/std/localization/locale.categories/category.numeric/locale.nm.put/facet.num.put.members/put_double.pass.cpp
index b131a41ceac34..09f0e81de4410 100644
--- a/libcxx/test/std/localization/locale.categories/category.numeric/locale.nm.put/facet.num.put.members/put_double.pass.cpp
+++ b/libcxx/test/std/localization/locale.categories/category.numeric/locale.nm.put/facet.num.put.members/put_double.pass.cpp
@@ -14281,6 +14281,52 @@ void test6() {
}
}
+void test7() {
+ char str[200];
+ std::locale lc = std::locale::classic();
+ const my_facet f(1);
+
+ {
+ double v = INFINITY;
+ std::ios ios(0);
+ std::fixed(ios);
+ ios.imbue(lc);
+
+ {
+ std::nouppercase(ios);
+ cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
+ std::string ex(str, base(iter));
+ assert(ex.substr(0, 3) == "inf");
+ }
+ {
+ std::uppercase(ios);
+ cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
+ std::string ex(str, base(iter));
+ assert(ex.substr(0, 3) == "INF");
+ }
+ }
+
+ {
+ double v = NAN;
+ std::ios ios(0);
+ std::fixed(ios);
+ ios.imbue(lc);
+
+ {
+ std::nouppercase(ios);
+ cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
+ std::string ex(str, base(iter));
+ assert(ex.substr(0, 3) == "nan");
+ }
+ {
+ std::uppercase(ios);
+ cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
+ std::string ex(str, base(iter));
+ assert(ex.substr(0, 3) == "NAN");
+ }
+ }
+}
+
int main(int, char**) {
test1();
test2();
@@ -14288,6 +14334,10 @@ int main(int, char**) {
test4();
test5();
test6();
+#if !defined(_AIX)
+ // TODO: AIX system libc seems to yield wrong capitalization for Infinity and NaN.
+ test7();
+#endif
return 0;
}
diff --git a/libcxx/test/std/localization/locale.categories/category.numeric/locale.nm.put/facet.num.put.members/put_long_double.pass.cpp b/libcxx/test/std/localization/locale.categories/category.numeric/locale.nm.put/facet.num.put.members/put_long_double.pass.cpp
index d044898a1f828..4fda65dcc43d4 100644
--- a/libcxx/test/std/localization/locale.categories/category.numeric/locale.nm.put/facet.num.put.members/put_long_double.pass.cpp
+++ b/libcxx/test/std/localization/locale.categories/category.numeric/locale.nm.put/facet.num.put.members/put_long_double.pass.cpp
@@ -22626,6 +22626,52 @@ void test10() {
}
}
+void test11() {
+ char str[200];
+ std::locale lc = std::locale::classic();
+ const my_facet f(1);
+
+ {
+ long double v = INFINITY;
+ std::ios ios(0);
+ std::fixed(ios);
+ ios.imbue(lc);
+
+ {
+ std::nouppercase(ios);
+ cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
+ std::string ex(str, base(iter));
+ assert(ex.substr(0, 3) == "inf");
+ }
+ {
+ std::uppercase(ios);
+ cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
+ std::string ex(str, base(iter));
+ assert(ex.substr(0, 3) == "INF");
+ }
+ }
+
+ {
+ long double v = NAN;
+ std::ios ios(0);
+ std::fixed(ios);
+ ios.imbue(lc);
+
+ {
+ std::nouppercase(ios);
+ cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
+ std::string ex(str, base(iter));
+ assert(ex.substr(0, 3) == "nan");
+ }
+ {
+ std::uppercase(ios);
+ cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', v);
+ std::string ex(str, base(iter));
+ assert(ex.substr(0, 3) == "NAN");
+ }
+ }
+}
+
int main(int, char**) {
test1();
test2();
@@ -22637,6 +22683,10 @@ int main(int, char**) {
test8();
test9();
test10();
+#if !defined(_AIX)
+ // TODO: AIX system libc seems to yield wrong capitalization for Infinity and NaN.
+ test11();
+#endif
std::locale lc = std::locale::classic();
std::locale lg(lc, new my_numpunct);
const my_facet f(1);
More information about the libcxx-commits
mailing list