[PowerPC][NFC] Cleanup PPCCTRLoopsVerify pass
[llvm-project.git] / libcxx / test / std / containers / container.adaptors / queue / queue.defn / push_rv.pass.cpp
blob2a75668a3a4b8baed50fcaaff73ac918873b1ee7
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 // UNSUPPORTED: c++03
11 // <queue>
13 // void push(value_type&& v);
15 #include <queue>
16 #include <cassert>
18 #include "test_macros.h"
19 #include "MoveOnly.h"
21 int main(int, char**)
23 std::queue<MoveOnly> q;
24 q.push(MoveOnly(1));
25 assert(q.size() == 1);
26 assert(q.front() == MoveOnly(1));
27 assert(q.back() == MoveOnly(1));
28 q.push(MoveOnly(2));
29 assert(q.size() == 2);
30 assert(q.front() == MoveOnly(1));
31 assert(q.back() == MoveOnly(2));
32 q.push(MoveOnly(3));
33 assert(q.size() == 3);
34 assert(q.front() == MoveOnly(1));
35 assert(q.back() == MoveOnly(3));
37 return 0;