cleanup: use range based for in download code

This removes a constant describing the length of the array.

The enumerated_range code had to be adapted, because the
interaction of C-type arrays with the C++ typesystem is mad.
With C-type arrays, one has to pass a reference to std::declval.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
Berthold Stoeger 2022-11-12 11:12:39 +01:00 committed by bstoeger
parent b61732da42
commit a2845ece82
2 changed files with 6 additions and 6 deletions

View file

@ -40,7 +40,7 @@ class enumerated_range
{
Range &base;
public:
using base_iterator = decltype(std::begin(std::declval<Range>()));
using base_iterator = decltype(std::begin(std::declval<Range &>()));
class iterator {
int idx;
base_iterator it;