Skip to content

Commit 5789ee2

Browse files
authored
[libc++] Guard transitive include of <locale> with availability macro (#97869)
This is a follow-up to #85521, similar to #95686.
1 parent 13ed3b4 commit 5789ee2

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

libcxx/include/chrono

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -996,7 +996,9 @@ constexpr chrono::year operator ""y(unsigned lo
996996

997997
#if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER == 20
998998
# include <charconv>
999-
# include <locale>
999+
# if !defined(_LIBCPP_HAS_NO_LOCALIZATION)
1000+
# include <locale>
1001+
# endif
10001002
# include <ostream>
10011003
#endif
10021004

0 commit comments

Comments
 (0)