In designs
Logically, there is no difference between the two:
In both cases, the stack is made large enough to hold the object, and the constructor is called on the object.
:
:
int x; // stack frame increased by sizeof(int) default construct (do nothing)
B a; // stack frame increased by sizeof(B) default construct.
:
int y(6);
B b(a);
Ok. , POD , ( ), , , .
. ( , ), POD, - .
:
, , .
vtable . , vtable, , ( ). vtable.
. , vtable , , . , vtable, , , , , .
. /. , , , , vtable , .