diff options
Diffstat (limited to 'src/handle.hpp')
-rw-r--r-- | src/handle.hpp | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/src/handle.hpp b/src/handle.hpp index 7620e69b..89c1c480 100644 --- a/src/handle.hpp +++ b/src/handle.hpp @@ -2,11 +2,23 @@ #include "handle-fwd.hpp" #include "compat/assert.hpp" -namespace floormat::Handle { +namespace floormat::impl_handle { +template<typename Obj, uint32_t PageSize> +bool Handle<Obj, PageSize>::operator==(const Handle& other) const noexcept +{ + bool ret = index == other.index; + fm_debug_assert(!ret || counter == other.counter); + return ret; +} +template<typename Obj, uint32_t PageSize> +Handle<Obj, PageSize>::operator bool() const noexcept +{ + return index != (uint32_t)-1; +} -} // namespace floormat::Handle +} // namespace floormat::impl_handle namespace floormat { |