Implement full support for non-pointer types in custom allocators. This is for the associative containers only. This work still needs to be done on the unordered and sequence containers. Fixes http://llvm.org/bugs/show_bug.cgi?id=15978
llvm-svn: 184358
diff --git a/libcxx/test/containers/associative/multimap/empty.pass.cpp b/libcxx/test/containers/associative/multimap/empty.pass.cpp
index c54920e..cafdb73 100644
--- a/libcxx/test/containers/associative/multimap/empty.pass.cpp
+++ b/libcxx/test/containers/associative/multimap/empty.pass.cpp
@@ -16,8 +16,11 @@
#include <map>
#include <cassert>
+#include "../../min_allocator.h"
+
int main()
{
+ {
typedef std::multimap<int, double> M;
M m;
assert(m.empty());
@@ -25,4 +28,16 @@
assert(!m.empty());
m.clear();
assert(m.empty());
+ }
+#if __cplusplus >= 201103L
+ {
+ typedef std::multimap<int, double, std::less<int>, min_allocator<std::pair<const int, double>>> M;
+ M m;
+ assert(m.empty());
+ m.insert(M::value_type(1, 1.5));
+ assert(!m.empty());
+ m.clear();
+ assert(m.empty());
+ }
+#endif
}