#include <iostream>
#include <vector>
#include <numeric>
#include <algorithm>

template<typename Type, typename... Args> 
void apply(std::vector<Type> &v, void(*algo)(Type*, Type*, Args...), Args... args)
{
    algo(&*v.begin(), &*v.end(), args...);
}

int main()
{
    std::vector<int> v(10, 50);
    apply<int, int>(v, std::iota, 3);
    for (unsigned int i = 0; i < v.size(); ++i) {
       std::cout<<v[i]<<std::endl;
    }
}