[PATCH] D54645: [libcxx] [test] Portability fix: add missing header for std::max_align_t.

Andrey Maksimov via Phabricator reviews at reviews.llvm.org
Fri Nov 16 12:53:05 PST 2018


amakc11 created this revision.
Herald added a reviewer: EricWF.
Herald added subscribers: libcxx-commits, ldionne.

Some tests use type std::max_align_t, but don't include <cstddef> header directly. As a result, these tests won't compile against some conformant libraries.


Repository:
  rCXX libc++

https://reviews.llvm.org/D54645

Files:
  test/std/containers/sequences/array/array.data/data.pass.cpp
  test/std/containers/sequences/array/array.data/data_const.pass.cpp
  test/std/utilities/memory/default.allocator/allocator.members/allocate.pass.cpp


Index: test/std/utilities/memory/default.allocator/allocator.members/allocate.pass.cpp
===================================================================
--- test/std/utilities/memory/default.allocator/allocator.members/allocate.pass.cpp
+++ test/std/utilities/memory/default.allocator/allocator.members/allocate.pass.cpp
@@ -14,6 +14,7 @@
 
 #include <memory>
 #include <cassert>
+#include <cstddef>       // for std::max_align_t
 #include <iostream>
 
 #include "test_macros.h"
Index: test/std/containers/sequences/array/array.data/data_const.pass.cpp
===================================================================
--- test/std/containers/sequences/array/array.data/data_const.pass.cpp
+++ test/std/containers/sequences/array/array.data/data_const.pass.cpp
@@ -13,6 +13,7 @@
 
 #include <array>
 #include <cassert>
+#include <cstddef>       // for std::max_align_t
 
 #include "test_macros.h"
 
Index: test/std/containers/sequences/array/array.data/data.pass.cpp
===================================================================
--- test/std/containers/sequences/array/array.data/data.pass.cpp
+++ test/std/containers/sequences/array/array.data/data.pass.cpp
@@ -13,6 +13,8 @@
 
 #include <array>
 #include <cassert>
+#include <cstddef>       // for std::max_align_t
+
 #include "test_macros.h"
 
 // std::array is explicitly allowed to be initialized with A a = { init-list };.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D54645.174431.patch
Type: text/x-patch
Size: 1389 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20181116/a0ea6a64/attachment.bin>


More information about the libcxx-commits mailing list