summaryrefslogtreecommitdiffstats
path: root/libcxx/test/containers/sequences/vector/db_index.pass.cpp
diff options
context:
space:
mode:
authorHoward Hinnant <hhinnant@apple.com>2013-06-27 19:35:32 +0000
committerHoward Hinnant <hhinnant@apple.com>2013-06-27 19:35:32 +0000
commit3ec1f00b733700a73adda3140e1ca2af551903d6 (patch)
tree080816321602b7bf58f0e237d15dad98f0fb6343 /libcxx/test/containers/sequences/vector/db_index.pass.cpp
parent161381e12076cbeb45e0c7481e68d54fe8553eb0 (diff)
downloadbcm5719-llvm-3ec1f00b733700a73adda3140e1ca2af551903d6.tar.gz
bcm5719-llvm-3ec1f00b733700a73adda3140e1ca2af551903d6.zip
Implement full support for non-pointer pointers in custom allocators for vector.
llvm-svn: 185093
Diffstat (limited to 'libcxx/test/containers/sequences/vector/db_index.pass.cpp')
-rw-r--r--libcxx/test/containers/sequences/vector/db_index.pass.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/libcxx/test/containers/sequences/vector/db_index.pass.cpp b/libcxx/test/containers/sequences/vector/db_index.pass.cpp
index 05b0bc48c56..f09f731e237 100644
--- a/libcxx/test/containers/sequences/vector/db_index.pass.cpp
+++ b/libcxx/test/containers/sequences/vector/db_index.pass.cpp
@@ -21,8 +21,11 @@
#include <exception>
#include <cstdlib>
+#include "../../min_allocator.h"
+
int main()
{
+ {
typedef int T;
typedef std::vector<T> C;
C c(1);
@@ -30,6 +33,18 @@ int main()
c.clear();
assert(c[0] == 0);
assert(false);
+ }
+#if __cplusplus >= 201103L
+ {
+ typedef int T;
+ typedef std::vector<T, min_allocator<T>> C;
+ C c(1);
+ assert(c[0] == 0);
+ c.clear();
+ assert(c[0] == 0);
+ assert(false);
+ }
+#endif
}
#else
OpenPOWER on IntegriCloud