Skip to content
Snippets Groups Projects
Commit 3a6e9ea0 authored by Carsten Gräser's avatar Carsten Gräser
Browse files

Add the sparseRange() utility function

This helper allows to use `for`-loops with
structured bindings for sparse ranges `R`
whose iterators `it` provide an
`it->index()` method, like this

```cpp
for(auto&& [A_i, i] : sparseRange(R))
  doSomethingWithValueAndIndex(A_i, i);
```
parent a6bfcb25
Branches
Tags
1 merge request!834Add the sparseRange() utility function
Pipeline #28104 passed
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment