I'm trying to get the code below to compile:
template <typename K, typename V>
static void addMapping(const K& id, const V& index, std::map<K, V>& mapset)
{
std::pair< std::map<K, V>::iterator, bool > ret;
// ...
}
but I get the following error message:
error: type/value mismatch at argument 1 in template parameter list for ‘template<class _T1, class _T2> struct std::pair’
std::pair< std::map<K, V>::iterator, bool > ret;
I recall that there's something special you need to write when you want to use a template parameter as an argument to another template, but I don't remember what that was...