I define a template function which loads a map from a CSV file:
template <class T>
bool loadCSV (QString filename, map<T,int> &mapping){
// function here
}
I then try to use it:
map<int, int> bw;
loadCSV<int>((const QString)"mycsv.csv",&bw);
But get htis compile time error:
error: no matching function for call to
‘loadCSV(const QString, std::map<int, int, std::less<int>, std::allocator<std::pair<const int, int> > >*)’
It seems my function call is bringing in some implicit arguments, but I don't understand the error and how to fix it. Any ideas?