1 //===----------------------------------------------------------------------===//
3 // The LLVM Compiler Infrastructure
5 // This file is dual licensed under the MIT and the University of Illinois Open
6 // Source Licenses. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 // XFAIL: libcpp-no-exceptions
13 // iterator insert(const_iterator position, size_type n, const value_type& x);
15 // UNSUPPORTED: sanitizer-new-delete
21 #include "min_allocator.h"
22 #include "count_new.hpp"
27 int a2[] = {1, 4, 4, 4, 4, 4, 2, 3};
29 typename List::iterator i = l1.insert(next(l1.cbegin()), 5, 4);
30 assert(i == next(l1.begin()));
31 assert(l1 == List(a2, a2+8));
32 globalMemCounter.throw_after = 4;
33 int save_count = globalMemCounter.outstanding_new;
36 i = l1.insert(i, 5, 5);
42 assert(globalMemCounter.checkOutstandingNewEq(save_count));
43 assert(l1 == List(a2, a2+8));
48 test<std::list<int> >();
49 #if TEST_STD_VER >= 11
50 test<std::list<int, min_allocator<int>>>();