functions.cpp

#include"funcs.h"

extern template class Array<int>; // extern templates go where the template would be instantiated, i.e. in a cpp file

Array<int> doubler(Array<int> a)

{

for(auto& elem : a) // here we want to modify the element, so we need a reference

{

elem *= 2;

}

return a;

}