[libcxx-commits] [libcxx] 127c349 - Guard an include of `<ostream>` in `<chrono>` with availability macro (#108429)

via libcxx-commits libcxx-commits at lists.llvm.org
Fri Sep 13 01:27:00 PDT 2024


Author: Konstantin Varlamov
Date: 2024-09-13T01:26:57-07:00
New Revision: 127c34948bd54e92ef2ee544e8bc42acecf321ad

URL: https://github.com/llvm/llvm-project/commit/127c34948bd54e92ef2ee544e8bc42acecf321ad
DIFF: https://github.com/llvm/llvm-project/commit/127c34948bd54e92ef2ee544e8bc42acecf321ad.diff

LOG: Guard an include of `<ostream>` in `<chrono>` with availability macro (#108429)

This fixes a regression introduced in
https://github.com/llvm/llvm-project/pull/96035.

Added: 
    

Modified: 
    libcxx/include/chrono

Removed: 
    


################################################################################
diff  --git a/libcxx/include/chrono b/libcxx/include/chrono
index 990c415ec2e972..7bec5e5a26ef4a 100644
--- a/libcxx/include/chrono
+++ b/libcxx/include/chrono
@@ -1015,8 +1015,8 @@ constexpr chrono::year                                  operator ""y(unsigned lo
 #  include <charconv>
 #  if !defined(_LIBCPP_HAS_NO_LOCALIZATION)
 #    include <locale>
+#    include <ostream>
 #  endif
-#  include <ostream>
 #endif
 
 #endif // _LIBCPP_CHRONO


        


More information about the libcxx-commits mailing list