Lovingly (and satirically) created by your friends at test double. Designed by Derek Briggs.
It's not meant to be serious, although I'm not sure what the point is. template <class T>
void foo(T arr)
{
for (auto it = arr.begin(); it != arr.end(); ++it)
{
std::cout << *it << std::endl;
}
}
You could pass a `std::map<int>` to `foo`, or a `std::list<string>`, or a `std::vector<char>`. You could even create your own classes and give them to `foo`, as long as they implement the `begin`/`end` protocol.
[1] https://en.wikipedia.org/wiki/Head-related_transfer_function