In C++, a function\'s signature depends partly on whether or not it\'s const. This means that a class can have two member functions with identical signatures except that on
Have a look at the behaviour of std::map::operator[]. The const version throws an error if you try to reference an invalid key, but the non-const version does an insert. The insertion behaviour is much handier than having to use std::map::insert (and will do an overwrite, moreover) but can't work for a const map.