Missing functionality in bulk visit
- Dominant language
- C++
- Stars
- 92
- Forks
- 88
- PR merge metrics
- No merged PRs in 30d
Description
I want to write a concurrent cache where I can lookup multiple items at once:
```
template
std::vector> lookup(const concurrent_flat_map& map, const std::vector& keys){
std::vector> result;
map.cvisit(keys.begin(), keys.end(), [&](const auto& x){
// PROBLEM: how to get 'i'??
result[i] = x->second;
});
return result;
}
```
I can't find a way to write this with the current API. I would like a new function that traverses an additional iterator in the same order:
```
template
std::vector> lookup(const concurrent_flat_map& map, const std::vector& keys){
std::vector> result;
map.cvisit(keys.begin(), keys.end(), result.begin(), [&](const auto& x, auto& it){
*it = x->second;
});
return result;
}
```
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.