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// <queue>
10
11// template <class T, class Container>
12// bool operator< (const queue<T, Container>& x,const queue<T, Container>& y);
13//
14// template <class T, class Container>
15// bool operator> (const queue<T, Container>& x,const queue<T, Container>& y);
16//
17// template <class T, class Container>
18// bool operator>=(const queue<T, Container>& x,const queue<T, Container>& y);
19//
20// template <class T, class Container>
21// bool operator<=(const queue<T, Container>& x,const queue<T, Container>& y);
22
23#include <queue>
24#include <cassert>
25
26#include "test_macros.h"
27
28template <class C>
29C make(int n) {
30 C c;
31 for (int i = 0; i < n; ++i)
32 c.push(i);
33 return c;
34}
35
36int main(int, char**) {
37 std::queue<int> q1 = make<std::queue<int> >(5);
38 std::queue<int> q2 = make<std::queue<int> >(10);
39 assert(q1 < q2);
40 assert(q2 > q1);
41 assert(q1 <= q2);
42 assert(q2 >= q1);
43
44 return 0;
45}
46

source code of libcxx/test/std/containers/container.adaptors/queue/queue.ops/lt.pass.cpp