[PowerPC][NFC] Cleanup PPCCTRLoopsVerify pass
[llvm-project.git] / libcxx / test / std / containers / sequences / list / list.modifiers / push_back.pass.cpp
blob29f22a566bf349aee0b21ce978311692207b1eb0
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 // void push_back(const value_type& x);
13 #include <list>
14 #include <cassert>
16 #include "test_macros.h"
17 #include "min_allocator.h"
19 int main(int, char**)
22 std::list<int> c;
23 for (int i = 0; i < 5; ++i)
24 c.push_back(i);
25 int a[] = {0, 1, 2, 3, 4};
26 assert(c == std::list<int>(a, a+5));
28 #if TEST_STD_VER >= 11
30 std::list<int, min_allocator<int>> c;
31 for (int i = 0; i < 5; ++i)
32 c.push_back(i);
33 int a[] = {0, 1, 2, 3, 4};
34 assert((c == std::list<int, min_allocator<int>>(a, a+5)));
36 #endif
38 return 0;