Lately I’ve had several cases where I’ve needed a user to pass a set of data to a method. It seems very un-generic to have a parameter be a const std::vector<stuff>& (or any particular container or array).
Is there a way I can (and should) pass groups of data to a method generically?
Pass two iterators, or, with c++11 you can use ranges. This is how C++ algorithms typically do it.
EDIT: I misremembered the new range-based for loops http://en.cppreference.com/w/cpp/language/range-for as having generic ranges for algorithms. Just pass two iterators to indicate a range for general purpose algorithms.