September 2017
Beginner to intermediate
384 pages
9h 18m
English
The idea of a "smart pointer" type (not to be confused with a "fancy pointer" type, which we'll cover in Chapter 8, Allocators) is that it's a class--typically a class template--which behaves syntactically just like a pointer, but whose special member functions (construction, destruction, and copying/moving) have additional bookkeeping to ensure certain invariants. For example, we might ensure the following:
Read now
Unlock full access