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

via libcxx-commits libcxx-commits at lists.llvm.org
Thu Sep 12 10:26:01 PDT 2024


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-libcxx

Author: Konstantin Varlamov (var-const)

<details>
<summary>Changes</summary>

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


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


1 Files Affected:

- (modified) libcxx/include/chrono (+1-1) 


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

``````````

</details>


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


More information about the libcxx-commits mailing list