Skip to content
Snippets Groups Projects

Add the sparseRange() utility function

Merged Carsten Gräser requested to merge feature/sparseRange into master

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

for(auto&& [A_i, i] : sparseRange(R))
  doSomethingWithValueAndIndex(A_i, i);

This also adds a test and fixes the placement of the range-utilities in the appropriate doxygen group to make them easier to discover.

Merge request reports

Pipeline #28104 passed

Pipeline passed for 3a6e9ea0 on feature/sparseRange

Approval is optional

Merged by Oliver SanderOliver Sander 4 years ago (Jul 7, 2020 7:23pm UTC)

Merge details

  • Changes merged into master with 90cbf00f.
  • Deleted the source branch.

Pipeline #28192 passed

Pipeline passed for 90cbf00f on master

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
Please register or sign in to reply
Loading