3 ms·
You could return a proxy object that offers operator= et al, and an implicit conversion operator to T& or T const& that throws an exception if that key is not i
by idupree 14y ago
You could return a proxy object that offers operator= et al, and an implicit conversion operator to T& or T const& that throws an exception if that key is not in the map.
(I don't know if that would be better, since it's even more magic and it still isn't perfect.)