[libcxx-commits] [libcxx] Implement P1885R12: `<text_encoding>` header (PR #141312)

via libcxx-commits libcxx-commits at lists.llvm.org
Sat May 24 11:49:09 PDT 2025


================
@@ -0,0 +1,1482 @@
+// -*- C++ -*-
+//===----------------------------------------------------------------------===//
+//
+// 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
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef _LIBCPP___TEXT_ENCODING_TEXT_ENCODING_H
+#define _LIBCPP___TEXT_ENCODING_TEXT_ENCODING_H
+
+#include <__config>
+
+#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#  pragma GCC system_header
+#endif
+
+#if _LIBCPP_HAS_LOCALIZATION
----------------
cor3ntin wrote:

locale and encoding are unrelated, for the most part. so I would not disable the feature if locale is not available.  
*maybe* environment/environment_is would be considered to require locale?

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


More information about the libcxx-commits mailing list