]>
Commit | Line | Data |
---|---|---|
99dee823 | 1 | // Copyright (C) 2020-2021 Free Software Foundation, Inc. |
597601aa JW |
2 | // |
3 | // This file is part of the GNU ISO C++ Library. This library is free | |
4 | // software; you can redistribute it and/or modify it under the | |
5 | // terms of the GNU General Public License as published by the | |
6 | // Free Software Foundation; either version 3, or (at your option) | |
7 | // any later version. | |
8 | ||
9 | // This library is distributed in the hope that it will be useful, | |
10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of | |
11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
12 | // GNU General Public License for more details. | |
13 | ||
14 | // You should have received a copy of the GNU General Public License along | |
15 | // with this library; see the file COPYING3. If not see | |
16 | // <http://www.gnu.org/licenses/>. | |
17 | ||
18 | // { dg-options "-std=gnu++2a" } | |
19 | // { dg-do compile { target c++2a } } | |
20 | ||
21 | #include <compare> | |
22 | ||
23 | static_assert(noexcept(std::partial_ordering::less == 0)); | |
24 | static_assert(noexcept(std::partial_ordering::less != 0)); | |
25 | static_assert(noexcept(std::partial_ordering::less < 0)); | |
26 | static_assert(noexcept(std::partial_ordering::less > 0)); | |
27 | static_assert(noexcept(std::partial_ordering::less <= 0)); | |
28 | static_assert(noexcept(std::partial_ordering::less >= 0)); | |
29 | static_assert(noexcept(std::partial_ordering::less <=> 0)); | |
30 | static_assert(noexcept(0 == std::partial_ordering::less)); | |
31 | static_assert(noexcept(0 != std::partial_ordering::less)); | |
32 | static_assert(noexcept(0 < std::partial_ordering::less)); | |
33 | static_assert(noexcept(0 > std::partial_ordering::less)); | |
34 | static_assert(noexcept(0 <= std::partial_ordering::less)); | |
35 | static_assert(noexcept(0 >= std::partial_ordering::less)); | |
36 | static_assert(noexcept(0 <=> std::partial_ordering::less)); | |
37 | ||
38 | static_assert(noexcept(std::weak_ordering::less == 0)); | |
39 | static_assert(noexcept(std::weak_ordering::less != 0)); | |
40 | static_assert(noexcept(std::weak_ordering::less < 0)); | |
41 | static_assert(noexcept(std::weak_ordering::less > 0)); | |
42 | static_assert(noexcept(std::weak_ordering::less <= 0)); | |
43 | static_assert(noexcept(std::weak_ordering::less >= 0)); | |
44 | static_assert(noexcept(std::weak_ordering::less <=> 0)); | |
45 | static_assert(noexcept(0 == std::weak_ordering::less)); | |
46 | static_assert(noexcept(0 != std::weak_ordering::less)); | |
47 | static_assert(noexcept(0 < std::weak_ordering::less)); | |
48 | static_assert(noexcept(0 > std::weak_ordering::less)); | |
49 | static_assert(noexcept(0 <= std::weak_ordering::less)); | |
50 | static_assert(noexcept(0 >= std::weak_ordering::less)); | |
51 | static_assert(noexcept(0 <=> std::weak_ordering::less)); | |
52 | ||
53 | static_assert(noexcept(std::strong_ordering::less == 0)); | |
54 | static_assert(noexcept(std::strong_ordering::less != 0)); | |
55 | static_assert(noexcept(std::strong_ordering::less < 0)); | |
56 | static_assert(noexcept(std::strong_ordering::less > 0)); | |
57 | static_assert(noexcept(std::strong_ordering::less <= 0)); | |
58 | static_assert(noexcept(std::strong_ordering::less >= 0)); | |
59 | static_assert(noexcept(std::strong_ordering::less <=> 0)); | |
60 | static_assert(noexcept(0 == std::strong_ordering::less)); | |
61 | static_assert(noexcept(0 != std::strong_ordering::less)); | |
62 | static_assert(noexcept(0 < std::strong_ordering::less)); | |
63 | static_assert(noexcept(0 > std::strong_ordering::less)); | |
64 | static_assert(noexcept(0 <= std::strong_ordering::less)); | |
65 | static_assert(noexcept(0 >= std::strong_ordering::less)); | |
66 | static_assert(noexcept(0 <=> std::strong_ordering::less)); |