1 //===----------------------------------------------------------------------===//
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7 //===----------------------------------------------------------------------===//
13 // iterator insert(const value_type& v);
18 #include "test_macros.h"
19 #include "min_allocator.h"
21 template<class Container
>
22 void do_insert_cv_test()
25 typedef typename
M::iterator R
;
26 typedef typename
M::value_type VT
;
30 assert(r
== m
.begin());
31 assert(m
.size() == 1);
36 assert(r
== m
.begin());
37 assert(m
.size() == 2);
42 assert(r
== std::prev(m
.end()));
43 assert(m
.size() == 3);
47 assert(r
== std::prev(m
.end()));
48 assert(m
.size() == 4);
54 do_insert_cv_test
<std::multiset
<int> >();
55 #if TEST_STD_VER >= 11
57 typedef std::multiset
<int, std::less
<int>, min_allocator
<int>> M
;
58 do_insert_cv_test
<M
>();