#include <iostream>
#include <vector>

using namespace std;

template<class Iter>
auto my_func(Iter beg, Iter end)
{
	return vector<typename iterator_traits<Iter>::value_type> (beg, end);
}

int main() {
    int bips[] = { 3,7,0,60,17 };//Passing pointers of array
    auto g = my_func(bips, bips + sizeof(bips) / sizeof(*bips));
    
    for(const auto i : g) cout << i << '\t';
    cout << endl;

    vector<int> v = { 10,5,4,14 };//Passing iterators of a vector 
    auto h = my_func(v.begin(), v.end());
    
    for(const auto i : h) cout << i << '\t';    
}