The code
auto fctHash=[](size_t val) -> size_t {
return val;
};
auto fctEqual=[](size_t val1, size_t val2) -> bool {
return val1 == val2;
};
tsl::sparse_map<size_t, int, decltype(fctHash), decltype(fctEqual)> V({}, fctHash, fctEqual);
does not compile. This is not dramatic as the following does:
std::function<size_t(size_t)> fctHash=[](size_t val) -> size_t {
return val;
};
std::function<bool(size_t,size_t)> fctEqual=[](size_t val1, size_t val2) -> bool {
return val1 == val2;
};
tsl::sparse_map<size_t, int, std::function<size_t(size_t)>, std::function<bool(size_t,size_t)>> V({}, fctHash, fctEqual);
but could this be addressed? This would allow better compatibility with the std::unordered_map for which tsl::sparse_map is a replacement.
The code
does not compile. This is not dramatic as the following does:
but could this be addressed? This would allow better compatibility with the
std::unordered_mapfor whichtsl::sparse_mapis a replacement.