ginkgo-project / ginkgo

Numerical linear algebra software package
https://ginkgo-project.github.io/
BSD 3-Clause "New" or "Revised" License
415 stars 90 forks source link

Add integer range #1602

Closed upsj closed 7 months ago

upsj commented 7 months ago

Pulled out of the other PRs #1601 #1582, this adds a simple integer range similar to Python's range, only without stride support for now. It allows writing range-for loops for (auto i : irange<int>{100}) with a slight advantage in const-correctness, since i can also be const in this context, and slightly more succinct code. With C++17 CTAD, we will also be able to omit the <int> in most cases.

ginkgo-bot commented 7 months ago

Error: PR already merged!

sonarcloud[bot] commented 7 months ago

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
No data about Duplication

See analysis details on SonarCloud