std::map default value for build-in type
This is defined in the standard, yes. map is performing “default initialization” in this case. As you say, for class types, that calls a no-arguments constructor. For built-in types, in the ’98 standard, see section 8.5, “Initializers”: To default-initialize an object of type T means: if T is a non-POD … if T is an … Read more