August 2012
Intermediate to advanced
976 pages
30h 17m
English
unique_ptrA unique_ptr “owns” the object to which it points. Unlike shared_ptr, only one unique_ptr at a time can point to a given object. The object to which a unique_ptr points is destroyed when the unique_ptr is destroyed. Table 12.4 lists the operations specific to unique_ptrs. The operations common to both were covered in Table 12.1 (p. 452).
Table 12.4. unique_ptr Operations (See Also Table 12.1 (p. 452))
Unlike shared_ptr, there is no library function comparable to make_shared that returns a unique_ptr. Instead, when we define ...
Read now
Unlock full access