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// UNSUPPORTED: c++03, c++11, c++14, c++17
10// UNSUPPORTED: GCC-ALWAYS_INLINE-FIXME
11
12// <stack>
13
14// template<class T, three_way_comparable Container>
15// compare_three_way_result_t<Container>
16// operator<=>(const stack<T, Container>& x, const stack<T, Container>& y);
17
18#include <cassert>
19#include <deque>
20#include <list>
21#include <stack>
22#include <vector>
23
24#include "nasty_containers.h"
25#include "test_container_comparisons.h"
26
27int main(int, char**) {
28 assert((test_sequence_container_adaptor_spaceship<std::stack, std::deque>()));
29 assert((test_sequence_container_adaptor_spaceship<std::stack, std::list>()));
30 assert((test_sequence_container_adaptor_spaceship<std::stack, std::vector>()));
31 assert((test_sequence_container_adaptor_spaceship<std::stack, nasty_list>()));
32 assert((test_sequence_container_adaptor_spaceship<std::stack, nasty_vector>()));
33 // `std::stack` is not constexpr, so no `static_assert` test here.
34 return 0;
35}
36

source code of libcxx/test/std/containers/container.adaptors/stack/compare.three_way.pass.cpp