[libcxx-commits] [libcxx] [libc++] In `<format>`, use availability macro if including `<locale>` (PR #99274)
Konstantin Varlamov via libcxx-commits
libcxx-commits at lists.llvm.org
Tue Jul 16 23:35:04 PDT 2024
https://github.com/var-const created https://github.com/llvm/llvm-project/pull/99274
This is a follow-up to https://github.com/llvm/llvm-project/pull/85478,
similar to https://github.com/llvm/llvm-project/pull/95686.
>From df8a44caec401ad4a274d85696c232c85d84d612 Mon Sep 17 00:00:00 2001
From: Konstantin Varlamov <varconst at apple.com>
Date: Tue, 16 Jul 2024 23:31:58 -0700
Subject: [PATCH] [libc++] In `<format>`, use availability macro if including
`<locale>`
This is a follow-up to https://github.com/llvm/llvm-project/pull/85478,
similar to https://github.com/llvm/llvm-project/pull/95686.
---
libcxx/include/format | 2 ++
1 file changed, 2 insertions(+)
diff --git a/libcxx/include/format b/libcxx/include/format
index 07c2ba083199e..526174762797f 100644
--- a/libcxx/include/format
+++ b/libcxx/include/format
@@ -224,7 +224,9 @@ namespace std {
#endif
#if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20
+# if !defined(_LIBCPP_HAS_NO_LOCALIZATION)
# include <locale>
+# endif
# include <queue>
# include <stack>
#endif
More information about the libcxx-commits
mailing list