#include <iostream>
#include <iterator>
#include <vector>

template <typename Iterator>
void test(Iterator begin, const Iterator end) {
  std::copy(begin, end, std::ostream_iterator<decltype(*begin)>(std::cout, "\n"));
}

template <typename Container>
void test(const Container& in) {
    test(std::begin(in), std::end(in));
}

int main() {
   std::vector<int> a = {1,2,3,4};
   test(a);

   int b[3]={5,6,7};
   test(b);
}
