• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 //===----------------------------------------------------------------------===//
2 //
3 //                     The LLVM Compiler Infrastructure
4 //
5 // This file is dual licensed under the MIT and the University of Illinois Open
6 // Source Licenses. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 
10 // <queue>
11 
12 // template <class T, class Container>
13 //   bool operator< (const queue<T, Container>& x,const queue<T, Container>& y);
14 //
15 // template <class T, class Container>
16 //   bool operator> (const queue<T, Container>& x,const queue<T, Container>& y);
17 //
18 // template <class T, class Container>
19 //   bool operator>=(const queue<T, Container>& x,const queue<T, Container>& y);
20 //
21 // template <class T, class Container>
22 //   bool operator<=(const queue<T, Container>& x,const queue<T, Container>& y);
23 
24 #include <queue>
25 #include <cassert>
26 
27 template <class C>
28 C
make(int n)29 make(int n)
30 {
31     C c;
32     for (int i = 0; i < n; ++i)
33         c.push(i);
34     return c;
35 }
36 
main()37 int main()
38 {
39     std::queue<int> q1 = make<std::queue<int> >(5);
40     std::queue<int> q2 = make<std::queue<int> >(10);
41     assert(q1 < q2);
42     assert(q2 > q1);
43     assert(q1 <= q2);
44     assert(q2 >= q1);
45 }
46