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 // <list>
10 // Can't test the system lib because this test enables debug mode
11 // UNSUPPORTED: with_system_cxx_lib=macosx
12 
13 // list(list&& c);
14 
15 #define _LIBCPP_DEBUG 1
16 #define _LIBCPP_ASSERT(x, m) ((x) ? (void)0 : std::exit(0))
17 
18 #include <list>
19 #include <cstdlib>
20 #include <cassert>
21 
22 #include "test_macros.h"
23 
main(int,char **)24 int main(int, char**)
25 {
26     std::list<int> l1;
27     l1.push_back(1); l1.push_back(2); l1.push_back(3);
28     std::list<int>::iterator i = l1.begin();
29     std::list<int> l2 = l1;
30     l2.erase(i);
31     assert(false);
32 
33   return 0;
34 }
35