Home:ALL Converter>Is the initialization of data members part of constructor?

Is the initialization of data members part of constructor?

Ask Time:2015-08-20T14:10:59         Author:acgtyrant

Json Formatter

As far as I know, this initialization will be complemented before the function body of the constructor.

If the initialization of data members is the part of constructor, then it should be inlined when the contructor is inlined, otherwise on the contrary.

By the way, how about the constructor list? And is the destroy of data member part of deconstructor?

Author:acgtyrant,eproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/32110748/is-the-initialization-of-data-members-part-of-constructor
MSalters :

The assumption is wrong. Compilers may partially inline functions. It's even easier to do so for constructors and destructors as you can't take their address anyway.\n\nStill, that's something you won't notice at C++ level, only if you inspect the assembly.",
2015-08-20T07:49:42
yy