summaryrefslogtreecommitdiffstats
path: root/libcxx/test/containers/sequences/vector/db_back.pass.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'libcxx/test/containers/sequences/vector/db_back.pass.cpp')
-rw-r--r--libcxx/test/containers/sequences/vector/db_back.pass.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/libcxx/test/containers/sequences/vector/db_back.pass.cpp b/libcxx/test/containers/sequences/vector/db_back.pass.cpp
index b28af8b2607..0893ba7a40d 100644
--- a/libcxx/test/containers/sequences/vector/db_back.pass.cpp
+++ b/libcxx/test/containers/sequences/vector/db_back.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.back() == 0);
assert(false);
+ }
+#if __cplusplus >= 201103L
+ {
+ typedef int T;
+ typedef std::vector<T, min_allocator<T>> C;
+ C c(1);
+ assert(c.back() == 0);
+ c.clear();
+ assert(c.back() == 0);
+ assert(false);
+ }
+#endif
}
#else
OpenPOWER on IntegriCloud