Fix for_each_indexed util function

- Fix typo in util function name for_each_indexed.
- Use the overloaded functions for_each_indexed and for_each_pair
  with a container argument where possible to improve readability.
This commit is contained in:
Michael Bell
2021-10-22 12:00:07 +01:00
parent 2c81083406
commit 04c2167c2d
6 changed files with 8 additions and 23 deletions
+1 -1
View File
@@ -20,7 +20,7 @@ void for_each_indexed(ForwardIterator first, ForwardIterator last, Function func
}
template <class ContainerT, typename Function>
void for_each_pair(ContainerT &container, Function function)
void for_each_indexed(ContainerT &container, Function function)
{
for_each_indexed(std::begin(container), std::end(container), function);
}