From 9fe6c82d08b95795e351af5dd5828fbb06a556c7 Mon Sep 17 00:00:00 2001 From: Yunsong Wang Date: Fri, 23 Aug 2024 16:22:08 -0700 Subject: [PATCH] Expose `key_eq` member accessors (#584) Currently, `key_eq` is only accessible in ref classes, not in container classes. This PR addresses the issue by exposing `key_eq` in all classes. --- include/cuco/detail/static_map/static_map.inl | 15 +++++++++++++++ .../detail/static_multimap/static_multimap.inl | 16 ++++++++++++++++ .../detail/static_multiset/static_multiset.inl | 15 +++++++++++++++ include/cuco/detail/static_set/static_set.inl | 13 +++++++++++++ include/cuco/static_map.cuh | 7 +++++++ include/cuco/static_multimap.cuh | 7 +++++++ include/cuco/static_multiset.cuh | 7 +++++++ include/cuco/static_set.cuh | 7 +++++++ 8 files changed, 87 insertions(+) diff --git a/include/cuco/detail/static_map/static_map.inl b/include/cuco/detail/static_map/static_map.inl index 08acdacaf..a90315187 100644 --- a/include/cuco/detail/static_map/static_map.inl +++ b/include/cuco/detail/static_map/static_map.inl @@ -709,6 +709,21 @@ static_map:: return impl_->erased_key_sentinel(); } +template +constexpr static_map::key_equal +static_map::key_eq() + const noexcept +{ + return impl_->key_eq(); +} + template erased_key_sentinel(); } +template +constexpr static_multimap:: + key_equal + static_multimap::key_eq() + const noexcept +{ + return impl_->key_eq(); +} + template return impl_->erased_key_sentinel(); } +template +constexpr static_multiset:: + key_equal + static_multiset::key_eq() + const noexcept +{ + return impl_->key_eq(); +} + template ::era return impl_->erased_key_sentinel(); } +template +constexpr static_set::key_equal +static_set::key_eq() const noexcept +{ + return impl_->key_eq(); +} + template