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