Is there a way to specify the default value std::map\'s operator[] returns when an key does not exist?
std::map
operator[]
Maybe you can give a custom allocator who allocate with a default value you want.
template < class Key, class T, class Compare = less, class Allocator = allocator > > class map;