October 2004
Intermediate to advanced
240 pages
6h 22m
English
Just because the standard provides a cliff in front of you, you are not necessarily required to jump off it.
—Norman Diamond
There is enough to be said about the Big Four special member functions that you will probably be unsurprised to see that they rate having their own section. Herein we collect knowledge and best practices related to default construction, copy construction, copy assignment, and destruction.
One of the reasons you need to be careful with these functions is that, given half a chance, the compiler will write them for you. Another reason is that C++ by default treats classes as value-like types, but not all types are value-like (see Item 32). Know when to write (or disable) these special ...
Read now
Unlock full access