От: | desco | http://v2matveev.blogspot.com | |
Дата: | 13.10.06 07:16 | ||
Оценка: | +1 |
то есть const int i = new int() эквивалентно выражению const int i = 0, которое в этом случае допустимо14.5.10.1 Object creation expressions
<skipped>
The compile-time processing of an object-creation-expression of the form new T(A), where T is a classtype,
a value-type, or a type-parameter, and A is an optional argument-list, consists of the following steps:
• If T is a value-type and A is not present:
o The object-creation-expression is a default constructor invocation. The result of the object-creation expression
is a value of type T, namely the default value for T as defined in §11.1.2.