What does the C++ standard mean regarding object lifetime begins?

前端 未结 3 1444
滥情空心
滥情空心 2021-01-27 11:40

In the n3690 C++ standard in section 3.8.1 there is this text:

The lifetime of an object of type T begins when:
— storage with the proper alignment and size for          


        
3条回答
  •  难免孤独
    2021-01-27 11:55

    12.6.2, [class.base.init], item 6, lists the steps of initialization, and this is the final one:

    Finally, the compound-statement of the constructor body is executed.

    So once the body has executed, initialization is complete.

提交回复
热议问题