c++03: default constructor for build-in types in std::map
问题 I always thought that following code std::map<int, int> test; std::cout << test[0] << std::endl; would print random value, because it would create unitialized value within map. However, it turns out that created int is actually always initialized to zero AND standard builtin types are also zero-initialized in certain circumstances. The question is : when zero-initialziation is performed for standard types (int/char/float/double/size_t)? I'm pretty sure that if I declare int i; in the middle