[VPlan] Add and use debug location for VPScalarCastRecipe.
[llvm-project.git] / libcxx / test / std / containers / sequences / list / list.cons / assign_copy.pass.cpp
blob39369d4f8295c5eb63f5b419d74d3ab2c9dfd0f3
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 //===----------------------------------------------------------------------===//
9 // <list>
11 // list& operator=(const list& c);
13 #include <list>
14 #include <cassert>
15 #include "test_macros.h"
16 #include "test_allocator.h"
17 #include "min_allocator.h"
19 int main(int, char**)
22 std::list<int, test_allocator<int> > l(3, 2, test_allocator<int>(5));
23 std::list<int, test_allocator<int> > l2(l, test_allocator<int>(3));
24 l2 = l;
25 assert(l2 == l);
26 assert(l2.get_allocator() == test_allocator<int>(3));
29 std::list<int, other_allocator<int> > l(3, 2, other_allocator<int>(5));
30 std::list<int, other_allocator<int> > l2(l, other_allocator<int>(3));
31 l2 = l;
32 assert(l2 == l);
33 assert(l2.get_allocator() == other_allocator<int>(5));
35 #if TEST_STD_VER >= 11
37 std::list<int, min_allocator<int> > l(3, 2, min_allocator<int>());
38 std::list<int, min_allocator<int> > l2(l, min_allocator<int>());
39 l2 = l;
40 assert(l2 == l);
41 assert(l2.get_allocator() == min_allocator<int>());
43 #endif
45 return 0;