I get this long and hard to understand warning when I call a constructor:
AssocArray<double, string> myAssocArray(names, myArr);
the code for the constructor:
template <class V, class AI, class I, class S>
AssocArray<V, AI, I, S>::AssocArray(const list<AI>& names, const Array<V, I, S>& source)
{
I curr = source.MinIndex();
typename list<AI>::const_iterator it;
for (it = names.begin(); it != names.end(); it++)
{
internal_array.insert(pair<AI,I>(*it, source[curr]));
curr++;
}
}
The warning that I get:
[Warning] passing `const double' for converting 2 of `std::pair<_T1, _T2>::pair(const _T1&, const _T2&) [with _T1 = std::string, _T2 = int]'
I would appreciate any insights.