Is the POD class initialized with default allocation initialization?

If I initialize the POD class with a new placement, can I assume that the memory will be initialized by default (to zeros)? This resource clearly states that if you call the default constructor of the null argument explicitly, the fields will be initialized by default, but it is unclear whether this will be true using the standard implementation of the new placement (passing an address). In this case, the standard behavior for zeroing memory?

+3
source share
1 answer

From the very beginning:

5.3.4 / 15:

  • - (), (8.5);

8,5/5:

T :

  • T - ( 9) (12.1), T ( , T );

  • T - , , T ;

  • T - , ;

, POD, . POD, int, float etc , POD POD. , , : " ".

, POD , . , .

, IMHO, - .

+3

Source: https://habr.com/ru/post/1712570/


All Articles