[VPlan] Add and use debug location for VPScalarCastRecipe.
[llvm-project.git] / libcxx / test / std / containers / sequences / list / list.cons / default.pass.cpp
blob32f2729b709600c023b8c26ae51b64cad7ad81a7
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 // explicit list(const Alloc& = Alloc());
13 #include <list>
14 #include <cassert>
15 #include "test_macros.h"
16 #include "DefaultOnly.h"
17 #include "min_allocator.h"
19 int main(int, char**)
22 std::list<int> l;
23 assert(l.size() == 0);
24 assert(std::distance(l.begin(), l.end()) == 0);
27 std::list<DefaultOnly> l;
28 assert(l.size() == 0);
29 assert(std::distance(l.begin(), l.end()) == 0);
32 std::list<int> l((std::allocator<int>()));
33 assert(l.size() == 0);
34 assert(std::distance(l.begin(), l.end()) == 0);
36 #if TEST_STD_VER >= 11
38 std::list<int, min_allocator<int>> l;
39 assert(l.size() == 0);
40 assert(std::distance(l.begin(), l.end()) == 0);
43 std::list<DefaultOnly, min_allocator<DefaultOnly>> l;
44 assert(l.size() == 0);
45 assert(std::distance(l.begin(), l.end()) == 0);
48 std::list<int, min_allocator<int>> l((min_allocator<int>()));
49 assert(l.size() == 0);
50 assert(std::distance(l.begin(), l.end()) == 0);
53 std::list<int> l = {};
54 assert(l.size() == 0);
55 assert(std::distance(l.begin(), l.end()) == 0);
58 std::list<int, explicit_allocator<int>> l;
59 assert(l.size() == 0);
60 assert(std::distance(l.begin(), l.end()) == 0);
63 std::list<int, explicit_allocator<int>> l((explicit_allocator<int>()));
64 assert(l.size() == 0);
65 assert(std::distance(l.begin(), l.end()) == 0);
67 #endif
69 return 0;