jmalkin commented on code in PR #342:
URL: https://github.com/apache/datasketches-cpp/pull/342#discussion_r1093657883
##########
fi/include/reverse_purge_hash_map.hpp:
##########
@@ -107,8 +113,8 @@ class reverse_purge_hash_map<K, V, H, E, A>::iterator:
public std::iterator<std:
iterator operator++(int) { iterator tmp(*this); operator++(); return tmp; }
bool operator==(const iterator& rhs) const { return count == rhs.count; }
bool operator!=(const iterator& rhs) const { return count != rhs.count; }
- const std::pair<K&, V> operator*() const {
- return std::pair<K&, V>(map->keys_[index], map->values_[index]);
+ const value_type operator*() const {
+ return value_type(map->keys_[index], map->values_[index]);
Review Comment:
I don't see how the implementation can do anything else? It seems weird to
implement as `reference(key, value)`
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]