[libcxx-commits] [libcxx] [libc++] In `<format>`, use availability macro if including `<locale>` (PR #99274)

via libcxx-commits libcxx-commits at lists.llvm.org
Tue Jul 16 23:35:35 PDT 2024


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-libcxx

Author: Konstantin Varlamov (var-const)

<details>
<summary>Changes</summary>

This is a follow-up to https://github.com/llvm/llvm-project/pull/85478,
similar to https://github.com/llvm/llvm-project/pull/95686.


---
Full diff: https://github.com/llvm/llvm-project/pull/99274.diff


1 Files Affected:

- (modified) libcxx/include/format (+2) 


``````````diff
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

``````````

</details>


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


More information about the libcxx-commits mailing list