The value is initialized using the default constructor, as the other answers say. However, it is useful to add that in case of simple types (integral types such as int, float, pointer or POD (plan old data) types), the values are zero-initialized (or zeroed by value-initialization (which is effectively the same thing), depending on which version of C++ is used).
Pre-C++17, use std::map::insert(), for newer versions use try_emplace(). It may be counter-intuitive, but these functions effectively have the behaviour of operator[] with custom default values.
意识到我已经迟到了,但是如果你对 operator[]的自定义默认行为感兴趣(即: 找到带有给定键的元素,如果它没有给 插入提供一个选择的默认值,并返回一个对新插入值或现有值的引用) ,那么在 C + + 17之前已经有一个函数可用了: std::map::insert()。如果键已经存在,insert实际上不会插入,而是将迭代器返回到现有值。