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
30make(int n)
31{
32 C c;
33 for (int i = 0; i < n; ++i)
34 c.push(i);
35 return c;
36}
37
38int main(int, char**)
39{
40 std::queue<int> q1 = make<std::queue<int> >(5);
41 std::queue<int> q2 = make<std::queue<int> >(10);
42 assert(q1 < q2);
43 assert(q2 > q1);
44 assert(q1 <= q2);
45 assert(q2 >= q1);
46
47 return 0;
48}
49

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