TITLE: default-initialization for built-in types (Newsgroups: comp.lang.c++.moderated, 27 Oct 99) VINOKUR: Alex Vinokur > Built-in types (int, char) are not C++-classes. > So, there are no constructors of these types. > How is a problem decided when using template functions? > What works instead of missing constructors? ADLER: Darin Adler The standard says in section 8.5/5 that default-initializing an object of a type other than non-POD class type or array type will zero-initialize it. Thus in this function int return_zero_and_leak() { return * new int(); } the result is guaranteed to be 0. But in this function int return_something_and_leak() { return * new int; } the integer created by "new int" has "an indeterminate initial value" according to the standard.