Is there an easier way to check whether an std::unordered_map::insert call succeeded than writing this mammoth block of code?
std::pair< T1, T2 > pair(val1, val2);
std::pair< std::unordered_map< T1, T2 >::const_iterator, bool> ret =
_tileTypes.insert(pair);
if(!ret.second) {
// insert did not succeed
}
How about just: