[libcxx-commits] [libcxx] 0cfdce8 - [libc++] Guard transitive include of `<locale>` with availability macro (#95686)

via libcxx-commits libcxx-commits at lists.llvm.org
Mon Jun 17 06:30:43 PDT 2024


Author: Konstantin Varlamov
Date: 2024-06-17T09:30:41-04:00
New Revision: 0cfdce854d588876bfca7030be868314e84c0e5b

URL: https://github.com/llvm/llvm-project/commit/0cfdce854d588876bfca7030be868314e84c0e5b
DIFF: https://github.com/llvm/llvm-project/commit/0cfdce854d588876bfca7030be868314e84c0e5b.diff

LOG: [libc++] Guard transitive include of `<locale>` with availability macro (#95686)

This is a follow-up to https://github.com/llvm/llvm-project/pull/80282.
The transitive includes of `<locale>` in `<vector>` were all guarded by
the availability macro -- the new include should also be guarded,
otherwise any users who compile with localization disabled will start
getting errors trying to include `<vector>`.

Added: 
    

Modified: 
    libcxx/include/vector

Removed: 
    


################################################################################
diff  --git a/libcxx/include/vector b/libcxx/include/vector
index fb03f77dbe767..ecefc6f6f5bcc 100644
--- a/libcxx/include/vector
+++ b/libcxx/include/vector
@@ -2983,7 +2983,9 @@ _LIBCPP_POP_MACROS
 #  include <concepts>
 #  include <cstdlib>
 #  include <iosfwd>
+#if !defined(_LIBCPP_HAS_NO_LOCALIZATION)
 #  include <locale>
+#endif
 #  include <tuple>
 #  include <type_traits>
 #  include <typeinfo>


        


More information about the libcxx-commits mailing list