[libcxx-commits] [libcxx] [libc++] Guard transitive include of <locale> with availability macro (PR #97869)
Konstantin Varlamov via libcxx-commits
libcxx-commits at lists.llvm.org
Fri Jul 5 17:58:37 PDT 2024
https://github.com/var-const created https://github.com/llvm/llvm-project/pull/97869
This is a follow-up to https://github.com/llvm/llvm-project/pull/85521,
similar to https://github.com/llvm/llvm-project/pull/95686.
>From bb885e29794265a28d4fbf8d640f77971847fe15 Mon Sep 17 00:00:00 2001
From: Konstantin Varlamov <varconst at apple.com>
Date: Fri, 5 Jul 2024 17:56:35 -0700
Subject: [PATCH] [libc++] Guard transitive include of <locale> with
availability macro
This is a follow-up to https://github.com/llvm/llvm-project/pull/85521,
similar to https://github.com/llvm/llvm-project/pull/95686.
---
libcxx/include/chrono | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/libcxx/include/chrono b/libcxx/include/chrono
index c66771ffbad1a7..23441ddb239865 100644
--- a/libcxx/include/chrono
+++ b/libcxx/include/chrono
@@ -996,7 +996,9 @@ constexpr chrono::year operator ""y(unsigned lo
#if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER == 20
# include <charconv>
-# include <locale>
+# if !defined(_LIBCPP_HAS_NO_LOCALIZATION)
+# include <locale>
+# endif
# include <ostream>
#endif
More information about the libcxx-commits
mailing list