use std::ranges for algorithms

Closed Xaver Hugl requested to merge work/zamundaaa/ranges into master

This makes the code a little bit shorter and more readable.

Merge request reports