Range-based for loop on a dynamic array?
To make use of the range-based for-loop you have to provide either begin() and end() member functions or overload the non-member begin() and end() functions. In the latter case, you can wrap your range in a std::pair and overload begin() and end() for those: namespace std { template <typename T> T* begin(std::pair<T*, T*> const& p) … Read more