Re[8]: про new и new()
От: Lorenzo_LAMAS  
Дата: 16.02.05 11:12
Оценка:
A>То есть, теперь default-initialization не предполагает вызова конструктора по-умолчанию?

т.е. для случая new NonPodType() речь идет о value-initialization, а не default-initialization, далее
в 8.5 (пардон, этот кусок я опустил )

-if T is a class type (clause 9) with a user-declared constructor (12.1), then the default constructor for T is called...


Но у нас его нету, и потому

— if T is a non-union class without a user-declared constructor, then every non-static data member and base
class component of T is value-initialized
...
— otherwise, the object is zero-initialized

Of course, the code must be complete enough to compile and link.
 
Подождите ...
Wait...
Пока на собственное сообщение не было ответов, его можно удалить.