|
Boost : |
From: David B. Held (dheld_at_[hidden])
Date: 2003-01-28 13:42:42
"Greg Colvin" <Gregory.Colvin_at_[hidden]> wrote in message
news:5.2.0.9.2.20030128104737.027bcea8_at_rgmgitmail.oraclecorp.com...
> At 10:08 AM 1/28/2003, Andrei Alexandrescu wrote:
> >[...]
> >I think what Peter refers to is that C++ might change to make
> >move semantics easier to implement. That would render the effort
> >unnecessary.
Only if we don't want smart_ptr for another year or two, or whenever
compiler vendors start shipping compilers that implement the new move
syntax, and people start using them in force.
> >If smart_ptr is to be proposed for standardization, the committee
> >can just as well package the new smart_ptr together with new
> >language features, notably move semantics and template typedefs
> >which would fit smart_ptr like a glove.
Yes, that would be ideal. Unfortunately, I can't write a reference
implementation using the move syntax or template typedefs with my
magical pink C++0x compiler. Until such a compiler is written, it
seems reasonable to offer what we can by way of move semantics.
> Also, auto_ptr is an ugly hack that needn't be replicated.
Disavowing your child? ;) Not everyone agrees with you. After all,
we still have scoped_ptr<> and a move proposal. auto_ptr was just
too far ahead of its time. ;)
Dave
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk