Sep 16, 2015

[C++] Compiler generated member functions

Compiler generated default:
Destructor:
Compiler will generate default destructor that will call data member's destructor.

Move constructor:
compilers typically generate code to destroy this's data member
in the event that an exception arises inside the move constructor.

Move assignment:
The compiler-generated move assignment operator needs to
destroy this object's data member before
it being reassigned from rhs's data.

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.