August 2012
Intermediate to advanced
976 pages
30h 17m
English
As we’ve seen, there are three basic operations to control copies of class objects: the copy constructor, copy-assignment operator, and destructor. Moreover, as we’ll see in § 13.6 (p. 531), under the new standard, a class can also define a move constructor and move-assignment operator.
Exercises Section 13.1.3
Exercise 13.9: What is a destructor? What does the synthesized destructor do? When is a destructor synthesized?
Exercise 13.10: What happens when a StrBlob object is destroyed? What about a StrBlobPtr?
Exercise 13.11: Add a destructor to your HasPtr class from the previous exercises.
Exercise 13.12: How ...
Read now
Unlock full access