41 constexpr hitbox& operator=(
hitbox const&)
noexcept =
default;
42 constexpr hitbox& operator=(
hitbox&&)
noexcept =
default;
47 hi::widget_id widget_id,
49 hitbox_type type = hitbox_type::_default) noexcept :
50 widget_id(widget_id), _elevation(elevation), type(type)
54 [[nodiscard]]
constexpr friend std::strong_ordering operator<=>(
hitbox const& lhs,
hitbox const& rhs)
noexcept
56 if ((lhs.widget_id ==
nullptr) == (rhs.widget_id ==
nullptr)) {
58 hilet elevation_ordering = lhs._elevation <=> rhs._elevation;
59 if (elevation_ordering == std::partial_ordering::equivalent) {
60 return to_underlying(lhs.type) <=> to_underlying(rhs.type);
61 }
else if (elevation_ordering == std::partial_ordering::less) {
62 return std::strong_ordering::less;
63 }
else if (elevation_ordering == std::partial_ordering::greater) {
64 return std::strong_ordering::greater;
68 }
else if (lhs.widget_id ==
nullptr) {
70 return std::strong_ordering::less;
73 return std::strong_ordering::greater;
#define hi_no_default(...)
This part of the code should not be reachable, unless a programming bug.
Definition assert.hpp:279