@@ -240,14 +240,12 @@ class dense_map {
240240 using sparse_container_type = std::vector<std::size_t , typename alloc_traits::template rebind_alloc<std::size_t >>;
241241 using packed_container_type = std::vector<node_type, typename alloc_traits::template rebind_alloc<node_type>>;
242242
243- template <typename Other>
244- [[nodiscard]] std::size_t key_to_bucket (const Other &key) const noexcept {
243+ [[nodiscard]] std::size_t key_to_bucket (const auto &key) const noexcept {
245244 // NOLINTNEXTLINE(cppcoreguidelines-pro-bounds-array-to-pointer-decay)
246245 return fast_mod (static_cast <size_type>(sparse.second ()(key)), bucket_count ());
247246 }
248247
249- template <typename Other>
250- [[nodiscard]] auto constrained_find (const Other &key, const std::size_t bucket) {
248+ [[nodiscard]] auto constrained_find (const auto &key, const std::size_t bucket) {
251249 for (auto offset = sparse.first ()[bucket]; offset != placeholder_position; offset = packed.first ()[offset].next ) {
252250 if (packed.second ()(packed.first ()[offset].element .first , key)) {
253251 return begin () + static_cast <iterator::difference_type>(offset);
@@ -257,8 +255,7 @@ class dense_map {
257255 return end ();
258256 }
259257
260- template <typename Other>
261- [[nodiscard]] auto constrained_find (const Other &key, const std::size_t bucket) const {
258+ [[nodiscard]] auto constrained_find (const auto &key, const std::size_t bucket) const {
262259 for (auto offset = sparse.first ()[bucket]; offset != placeholder_position; offset = packed.first ()[offset].next ) {
263260 if (packed.second ()(packed.first ()[offset].element .first , key)) {
264261 return cbegin () + static_cast <const_iterator::difference_type>(offset);
0 commit comments