[libcxx-commits] [libcxx] 5789ee2 - [libc++] Guard transitive include of `<locale>` with availability macro (#97869)

via libcxx-commits libcxx-commits at lists.llvm.org
Sun Jul 7 22:55:38 PDT 2024


Author: Konstantin Varlamov
Date: 2024-07-07T22:55:35-07:00
New Revision: 5789ee28772d942da113762f45fa5f47996b55d7

URL: https://github.com/llvm/llvm-project/commit/5789ee28772d942da113762f45fa5f47996b55d7
DIFF: https://github.com/llvm/llvm-project/commit/5789ee28772d942da113762f45fa5f47996b55d7.diff

LOG: [libc++] Guard transitive include of `<locale>` with availability macro (#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.

Added: 
    

Modified: 
    libcxx/include/chrono

Removed: 
    


################################################################################
diff  --git a/libcxx/include/chrono b/libcxx/include/chrono
index c66771ffbad1a..23441ddb23986 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