I have a code in which I do m[k] += x where m is a std::map and this works even when m[k] is empty (this sets m[k] to x). How does it work? I want to overload += and I want to know whether I have to deal with such a situation in the body of +=. In my current code, the value type of m is double.