diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2024-07-12 22:14:44 +0200 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2024-07-14 13:04:41 +0200 |
commit | 19abcac32009d58450d80add39c5b1d5e7d8a993 (patch) | |
tree | eca43054b1614778fd9468f087b134f54f5e18dd /src/handle.hpp | |
parent | eb469ff58365517515d73827e70a9519436b5858 (diff) |
w
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 { |