| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
|
| 18 |
|
| 19 |
|
| 20 |
|
| 21 |
|
| 22 |
|
| 23 |
|
| 24 |
|
| 25 |
|
| 26 |
|
| 27 |
|
| 28 |
|
| 29 |
|
| 30 |
#ifndef _GLIBCXX_MONOSTATE_H |
| 31 |
#define _GLIBCXX_MONOSTATE_H 1 |
| 32 |
|
| 33 |
#include <bits/version.h> |
| 34 |
|
| 35 |
#ifdef __glibcxx_variant |
| 36 |
|
| 37 |
#include <bits/functional_hash.h> |
| 38 |
#if __cplusplus >= 202002L |
| 39 |
# include <compare> |
| 40 |
#endif |
| 41 |
|
| 42 |
namespace std _GLIBCXX_VISIBILITY(default) |
| 43 |
{ |
| 44 |
_GLIBCXX_BEGIN_NAMESPACE_VERSION |
| 45 |
struct monostate { }; |
| 46 |
|
| 47 |
constexpr bool operator==(monostate, monostate) noexcept { return true; } |
| 48 |
#ifdef __cpp_lib_three_way_comparison |
| 49 |
constexpr strong_ordering |
| 50 |
operator<=>(monostate, monostate) noexcept { return strong_ordering::equal; } |
| 51 |
#else |
| 52 |
constexpr bool operator!=(monostate, monostate) noexcept { return false; } |
| 53 |
constexpr bool operator<(monostate, monostate) noexcept { return false; } |
| 54 |
constexpr bool operator>(monostate, monostate) noexcept { return false; } |
| 55 |
constexpr bool operator<=(monostate, monostate) noexcept { return true; } |
| 56 |
constexpr bool operator>=(monostate, monostate) noexcept { return true; } |
| 57 |
#endif |
| 58 |
|
| 59 |
template<> |
| 60 |
struct hash<monostate> |
| 61 |
{ |
| 62 |
#if __cplusplus < 202002L |
| 63 |
using result_type [[__deprecated__]] = size_t; |
| 64 |
using argument_type [[__deprecated__]] = monostate; |
| 65 |
#endif |
| 66 |
|
| 67 |
size_t |
| 68 |
operator()(const monostate&) const noexcept |
| 69 |
{ |
| 70 |
constexpr size_t __magic_monostate_hash = -7777; |
| 71 |
return __magic_monostate_hash; |
| 72 |
} |
| 73 |
}; |
| 74 |
|
| 75 |
_GLIBCXX_END_NAMESPACE_VERSION |
| 76 |
} |
| 77 |
#endif |
| 78 |
#endif |