Re:Exception Safety, Garbage Collection etc. (a.k.a. Why Doe...
by ezy on Friday May 06, 2011 @05:13PM
(#2522501)
Likewise for auto_ptr<T>, but he glosses over that.
[ Parent
| on HN ]
Re:Exception Safety, Garbage Collection etc. (a.k.a. Why Doe...
by shasta on Friday May 06, 2011 @05:50PM
(#2522613)
How do you figure? There isn't an implicit conversion from auto_ptr<T> to T *.
Re:Exception Safety, Garbage Collection etc. (a.k.a. Why Doe...
by obiterdictum on Saturday May 07, 2011 @02:08AM
(#2523294)
There isn't. There are two explicit methods to get raw pointer value with different semantics:
- get(): auto_ptr retains the ownership
- release(): auto_ptr loses the ownership