
8 Dec
2005
8 Dec
'05
9:42 a.m.
Peter Dimov wrote:
Yuval Ronen wrote:
Does that mean that on a stricter compiler, when passing a temporary auto_ptr, I *have* to use the '.release()' way, and *can't* get the strong exception guarantee?
Yes it does, but when your source is a temporary, it doesn't make any difference; even if it's left unchanged by the constructor, it will be destroyed at the end of the full expression, along with the pointee.
Ok, I see. Thanks.