$include_dir="/home/hyper-archives/boost-users/include"; include("$include_dir/msg-header.inc") ?>
From: me22 (me22.ca_at_[hidden])
Date: 2005-10-01 01:43:17
On 30/09/05, John Sun <jsunnewsgroup_at_[hidden]> wrote:
> Appreciate your help, can you explain what's the rationale that you use
> "reset" instead of a simple more natural way of "assign".
>
For one, that's the way that auto_ptr does it.
Second, plain assignment can cause hidden bugs because it would take
ownership of something in the middle where it's hard to notice. You
can just construct a new smart pointer and assign the temporary to the
one you want to change, anyways.
- Scott