pointer_stable.h 486 B

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