[libcxx-commits] [libcxx] [libc++] Mark LWG4084 as resolved (PR #206224)
Connector Switch via libcxx-commits
libcxx-commits at lists.llvm.org
Sat Jun 27 00:57:31 PDT 2026
================
@@ -0,0 +1,65 @@
+//===----------------------------------------------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+// <locale>
+
+// class num_put<charT, OutputIterator>
+
+// LWG4084: std::fixed ignores std::uppercase
+
+#include <cassert>
+#include <ios>
+#include <limits>
+#include <locale>
+#include <string>
+
+#include "test_iterators.h"
+
+typedef std::num_put<char, cpp17_output_iterator<char*> > Facet;
+
+class my_facet : public Facet {
+public:
+ explicit my_facet(std::size_t refs = 0) : Facet(refs) {}
+};
+
+template <class T>
+std::string put(T value, std::ios_base& ios) {
+ char str[100];
+ const my_facet f(1);
+ cpp17_output_iterator<char*> iter = f.put(cpp17_output_iterator<char*>(str), ios, '*', value);
+ return std::string(str, base(iter));
+}
+
+bool is_lowercase_infinity(const std::string& str) { return str == "inf" || str == "infinity"; }
+
+bool is_uppercase_infinity(const std::string& str) { return str == "INF" || str == "INFINITY"; }
----------------
c8ef wrote:
Done.
https://github.com/llvm/llvm-project/pull/206224
More information about the libcxx-commits
mailing list