short description of auto_ptr

This commit is contained in:
Jidong Xiao
2025-04-18 03:46:34 -04:00
committed by JamesFlare1212
parent feeb84eae7
commit 64aa4ba11c

View File

@@ -342,6 +342,8 @@ int main() {
- std::scoped_ptr: (Boost) “Remembers” to delete things when they go out of scope. Alternate to auto_ptr. Cannot be copied. - std::scoped_ptr: (Boost) “Remembers” to delete things when they go out of scope. Alternate to auto_ptr. Cannot be copied.
- std::auto_ptr: was C++98s first smart pointer, but it's broken and removed now.
## 27.15 Exercise ## 27.15 Exercise
In the following [program](shared_ptr1.cpp), the use count will be printed 3 times. What exact value will be printed each time? In the following [program](shared_ptr1.cpp), the use count will be printed 3 times. What exact value will be printed each time?