summaryrefslogtreecommitdiffstats
path: root/libcxx/test/std/utilities/allocator.adaptor
diff options
context:
space:
mode:
authorCasey Carter <Casey@Carter.net>2017-05-25 17:42:17 +0000
committerCasey Carter <Casey@Carter.net>2017-05-25 17:42:17 +0000
commit895db0a5f6588fafa3fc1aa088d680d3c5db7e19 (patch)
tree7f30ec4f76752464dad604de306513f4dc03d9ab /libcxx/test/std/utilities/allocator.adaptor
parent86e070f7e9b0c173269c3827665b8d8141165d2d (diff)
downloadbcm5719-llvm-895db0a5f6588fafa3fc1aa088d680d3c5db7e19.tar.gz
bcm5719-llvm-895db0a5f6588fafa3fc1aa088d680d3c5db7e19.zip
[test] Workaround C1XX bug in uses_allocator_types.hpp
VSO#109062 "Explicit template argument specification with empty template parameter pack expansion does not imply further empty pack expansion" Differential Revision: https://reviews.llvm.org/D33214 llvm-svn: 303888
Diffstat (limited to 'libcxx/test/std/utilities/allocator.adaptor')
-rw-r--r--libcxx/test/std/utilities/allocator.adaptor/allocator.adaptor.members/construct_pair.pass.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/libcxx/test/std/utilities/allocator.adaptor/allocator.adaptor.members/construct_pair.pass.cpp b/libcxx/test/std/utilities/allocator.adaptor/allocator.adaptor.members/construct_pair.pass.cpp
index 4e73d806431..82d63ecada4 100644
--- a/libcxx/test/std/utilities/allocator.adaptor/allocator.adaptor.members/construct_pair.pass.cpp
+++ b/libcxx/test/std/utilities/allocator.adaptor/allocator.adaptor.members/construct_pair.pass.cpp
@@ -39,6 +39,7 @@ void test_no_inner_alloc()
using SA = std::scoped_allocator_adaptor<Alloc>;
static_assert(std::uses_allocator<T, CountingAllocator<T> >::value, "");
Pair * ptr = (Pair*)std::malloc(sizeof(Pair));
+ assert(ptr);
Alloc CA(P);
SA A(CA);
A.construct(ptr);
@@ -61,6 +62,7 @@ void test_no_inner_alloc()
using SA = std::scoped_allocator_adaptor<Alloc>;
static_assert(std::uses_allocator<T, CountingAllocator<T> >::value, "");
Pair * ptr = (Pair*)std::malloc(sizeof(Pair));
+ assert(ptr);
Alloc CA(P);
SA A(CA);
A.construct(ptr);
@@ -77,7 +79,6 @@ void test_no_inner_alloc()
void test_with_inner_alloc()
{
- using VoidAlloc1 = CountingAllocator<void, 1>;
using VoidAlloc2 = CountingAllocator<void, 2>;
AllocController POuter;
@@ -93,6 +94,7 @@ void test_with_inner_alloc()
static_assert(!std::uses_allocator<T, Outer>::value, "");
static_assert(std::uses_allocator<T, Inner>::value, "");
Pair * ptr = (Pair*)std::malloc(sizeof(Pair));
+ assert(ptr);
Outer O(POuter);
Inner I(PInner);
SA A(O, I);
@@ -119,6 +121,7 @@ void test_with_inner_alloc()
static_assert(!std::uses_allocator<T, Outer>::value, "");
static_assert(std::uses_allocator<T, Inner>::value, "");
Pair * ptr = (Pair*)std::malloc(sizeof(Pair));
+ assert(ptr);
Outer O(POuter);
Inner I(PInner);
SA A(O, I);
OpenPOWER on IntegriCloud