pointer_stable.h 506 B

1234567891011121314151617181920212223
  1. #ifndef ENTT_COMMON_POINTER_STABLE_H
  2. #define ENTT_COMMON_POINTER_STABLE_H
  3. #include <compare>
  4. namespace test {
  5. struct pointer_stable {
  6. static constexpr auto in_place_delete = true;
  7. int value{};
  8. [[nodiscard]] constexpr bool operator==(const pointer_stable &other) const noexcept {
  9. return value == other.value;
  10. }
  11. [[nodiscard]] constexpr auto operator<=>(const pointer_stable &other) const noexcept {
  12. return value <=> other.value;
  13. }
  14. };
  15. } // namespace test
  16. #endif