[libcxx-commits] [libcxx] [libc++] Avoid including libc++ private header in std/ test (PR #79856)

via libcxx-commits libcxx-commits at lists.llvm.org
Mon Jan 29 08:14:34 PST 2024


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-libcxx

Author: Louis Dionne (ldionne)

<details>
<summary>Changes</summary>

Fixes #<!-- -->79783

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


1 Files Affected:

- (modified) libcxx/test/std/containers/sequences/array/size_and_alignment.compile.pass.cpp (+4-1) 


``````````diff
diff --git a/libcxx/test/std/containers/sequences/array/size_and_alignment.compile.pass.cpp b/libcxx/test/std/containers/sequences/array/size_and_alignment.compile.pass.cpp
index b7fb40c988678ae..209e24964807d91 100644
--- a/libcxx/test/std/containers/sequences/array/size_and_alignment.compile.pass.cpp
+++ b/libcxx/test/std/containers/sequences/array/size_and_alignment.compile.pass.cpp
@@ -22,7 +22,10 @@
 #include <array>
 #include <cstddef>
 #include <type_traits>
-#include <__type_traits/datasizeof.h>
+
+#ifdef _LIBCPP_VERSION
+#  include <__type_traits/datasizeof.h>
+#endif
 
 #include "test_macros.h"
 

``````````

</details>


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


More information about the libcxx-commits mailing list