diff options
author | Haowei Wu <haowei@google.com> | 2023-03-29 17:07:31 -0700 |
---|---|---|
committer | Haowei Wu <haowei@google.com> | 2023-03-29 17:07:31 -0700 |
commit | 89bcac0f8fb098e32c4b5f192bd2d2997d8ee9cf (patch) | |
tree | 892c2efaabc4e392ea3fbc6626091eb55fffa8e9 /libcxx | |
parent | d9262beac35a1c65417570c15427abf65f1eb39d (diff) | |
download | llvm-89bcac0f8fb098e32c4b5f192bd2d2997d8ee9cf.zip llvm-89bcac0f8fb098e32c4b5f192bd2d2997d8ee9cf.tar.gz llvm-89bcac0f8fb098e32c4b5f192bd2d2997d8ee9cf.tar.bz2 |
Revert "[libc++] Add minor test for polymorphic_allocator.construct with mixed argument pair"
This reverts commit b66a6e4b104b245ed448e3dea944fa7e842a96b2 which
breaks runtime tests.
Diffstat (limited to 'libcxx')
-rw-r--r-- | libcxx/test/std/utilities/utility/mem.res/mem.poly.allocator.class/mem.poly.allocator.mem/construct_pair.pass.cpp | 20 |
1 files changed, 2 insertions, 18 deletions
diff --git a/libcxx/test/std/utilities/utility/mem.res/mem.poly.allocator.class/mem.poly.allocator.mem/construct_pair.pass.cpp b/libcxx/test/std/utilities/utility/mem.res/mem.poly.allocator.class/mem.poly.allocator.mem/construct_pair.pass.cpp index 75bfe6f..4677bf0 100644 --- a/libcxx/test/std/utilities/utility/mem.res/mem.poly.allocator.class/mem.poly.allocator.mem/construct_pair.pass.cpp +++ b/libcxx/test/std/utilities/utility/mem.res/mem.poly.allocator.class/mem.poly.allocator.mem/construct_pair.pass.cpp @@ -25,16 +25,15 @@ int constructed = 0; -template <int> struct default_constructible { default_constructible() : x(42) { ++constructed; } int x = 0; }; int main(int, char**) { - // pair<default_constructible, default_constructible> + // pair<default_constructible, default_constructible> as T() { - typedef default_constructible<0> T; + typedef default_constructible T; typedef std::pair<T, T> P; typedef std::pmr::polymorphic_allocator<void> A; alignas(P) char buffer[sizeof(P)]; @@ -46,20 +45,5 @@ int main(int, char**) { assert(ptr->second.x == 42); } - // pair<default_constructible<0>, default_constructible<1>> - { - typedef default_constructible<0> T; - typedef default_constructible<1> U; - typedef std::pair<T, U> P; - typedef std::pmr::polymorphic_allocator<void> A; - alignas(P) char buffer[sizeof(P)]; - P* ptr = reinterpret_cast<P*>(buffer); - A a; - a.construct(ptr); - assert(constructed == 2); - assert(ptr->first.x == 42); - assert(ptr->second.x == 42); - } - return 0; } |