|
-
November 12th, 2003, 08:05 AM
#11
Oh yes, you missed something. copying auto_ptrs transfers
ownership of the object pointed to and sets the copied auto_ptr
to null. Using containers of auto_ptrs can lead to all sorts
of bad, bad behavior. I suggest you go look it up. Now since the
op is "required" to use all sorts of bad programming techniques
maybe he should toss some containers of auto_prts in there
just to make it complete.
OK see what you mean. We can get behavior problem due to the fact that copy constructor of auto_ptr is not const for the original. You are right, it was a bad idea. Thanks for explanation.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|