Permalink
Browse files

Buildfix

  • Loading branch information...
hrydgard committed Aug 20, 2017
1 parent 237cca6 commit 6ffb3d6b537527db2741665a294365801f35ca97
Showing with 4 additions and 6 deletions.
  1. +4 −6 Common/Hashmaps.h
View
@@ -115,9 +115,8 @@ class DenseHashMap {
return count_;
}
// TODO: Find a way to avoid std::function. I tried using a templated argument
// but couldn't get it to pass the compiler.
inline void Iterate(std::function<void(const typename Key &key, typename Value value)> func) {
template<class T>
inline void Iterate(T func) {
for (auto &iter : map) {
if (iter.state == BucketState::TAKEN) {
func(iter.key, iter.value);
@@ -253,9 +252,8 @@ class PrehashMap {
return count_;
}
// TODO: Find a way to avoid std::function. I tried using a templated argument
// but couldn't get it to pass the compiler.
void Iterate(std::function<void(uint32_t hash, typename Value value)> func) {
template<class T>
void Iterate(T func) {
for (auto &iter : map) {
if (iter.state == BucketState::TAKEN) {
func(iter.hash, iter.value);

0 comments on commit 6ffb3d6

Please sign in to comment.