I'm making my first use of c++ template to declare a simple returning for a vector of ints, int64_t, floats or doubles its mean and standard deviation in a pair of doubles objects.
I've been trying to copy the models I found on the internet and started with:
template<typename Type>
pair<double,double> mean_std(vector<Type>::iterator the_beg, vector<Type>::iterator the_end){
// rest of my function
but this already returns me the errors:
template declaration of ‘std::pair<double, double> mean_std’
code.cpp:22:53: error: expected ‘)’ before ‘the_beg’
code.cpp:22:85: error: expected ‘)’ before ‘the_end’
when compiling.
Is it because of some subtlety in using templates with vector (or their iterators)?