pointer_stable.h 448 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. };
  8. inline bool operator==(const pointer_stable &lhs, const pointer_stable &rhs) {
  9. return lhs.value == rhs.value;
  10. }
  11. inline bool operator<(const pointer_stable &lhs, const pointer_stable &rhs) {
  12. return lhs.value < rhs.value;
  13. }
  14. } // namespace test
  15. #endif