This is indicated by the standard (all citations from N3337).
T x{}; - initialization of the list.
[dcl.init.list]/1: Initialization of a list is the initialization of an object or link from a list bound to init-init. Such an initializer is called a list of initializers, and comma-separated list initializers are called elements of a list of initializers. The list of initializers may be empty. [...]
Used definition to initialize a list:
[dcl.init.list]/3: An initialization list of an object or link of type T is defined as follows:
- [many inapplicable rules]
- Otherwise, if there are no elements in the initializer list, the object is initialized with a value.
Thus, the form for built-in types is initialization of values:
[dcl.init]/7: To initialize an object of type T means:
- [not applicable rules]
- otherwise, the object is initialized to zero.
So, now we are looking for zero initialization (yes, C ++ has many types of initialization):
[dcl.init]/5: For zero initialization of an object or link of type T means:
- if
T is a scalar type (3.9), the object is set to 0 (zero), taken as an integral constant expression, converted to T; - [...]
Yay, since arithmetic types are scalar types ( [basic.types]/9 , if you don't trust me), these forms initialize their objects with 0 .
Tartanllama
source share