1 //===----------------------------------------------------------------------===// 2 // 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 6 // 7 //===----------------------------------------------------------------------===// 8 9 // Can't test the system lib because this test enables debug mode 10 // UNSUPPORTED: with_system_cxx_lib=macosx 11 12 // <list> 13 14 // iterator insert(const_iterator position, size_type n, const value_type& x); 15 16 #define _LIBCPP_DEBUG 1 17 #define _LIBCPP_ASSERT(x, m) ((x) ? (void)0 : std::exit(0)) 18 19 #include <list> 20 #include <cstdlib> 21 #include <cassert> 22 23 #include "test_macros.h" 24 main(int,char **)25int main(int, char**) 26 { 27 std::list<int> c1(100); 28 std::list<int> c2; 29 std::list<int>::iterator i = c1.insert(next(c2.cbegin(), 10), 5, 1); 30 assert(false); 31 32 return 0; 33 } 34