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

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@184358 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/containers/associative/multimap/multimap.modifiers/insert_iter_cv.pass.cpp b/test/containers/associative/multimap/multimap.modifiers/insert_iter_cv.pass.cpp
index ebe4901..0c8e916 100644
--- a/test/containers/associative/multimap/multimap.modifiers/insert_iter_cv.pass.cpp
+++ b/test/containers/associative/multimap/multimap.modifiers/insert_iter_cv.pass.cpp
@@ -16,6 +16,8 @@
 #include <map>
 #include <cassert>
 
+#include "../../../min_allocator.h"
+
 int main()
 {
     {
@@ -46,4 +48,34 @@
         assert(r->first == 3);
         assert(r->second == 4.5);
     }
+#if __cplusplus >= 201103L
+    {
+        typedef std::multimap<int, double, std::less<int>, min_allocator<std::pair<const int, double>>> M;
+        typedef M::iterator R;
+        M m;
+        R r = m.insert(m.end(), M::value_type(2, 2.5));
+        assert(r == m.begin());
+        assert(m.size() == 1);
+        assert(r->first == 2);
+        assert(r->second == 2.5);
+
+        r = m.insert(m.end(), M::value_type(1, 1.5));
+        assert(r == m.begin());
+        assert(m.size() == 2);
+        assert(r->first == 1);
+        assert(r->second == 1.5);
+
+        r = m.insert(m.end(), M::value_type(3, 3.5));
+        assert(r == prev(m.end()));
+        assert(m.size() == 3);
+        assert(r->first == 3);
+        assert(r->second == 3.5);
+
+        r = m.insert(prev(m.end()), M::value_type(3, 4.5));
+        assert(r == prev(m.end(), 2));
+        assert(m.size() == 4);
+        assert(r->first == 3);
+        assert(r->second == 4.5);
+    }
+#endif
 }