|
Boost : |
From: Andrei Alexandrescu (andrewalex_at_[hidden])
Date: 2002-05-01 00:27:09
"Howard Hinnant" <hinnant_at_[hidden]> wrote in message
news:1441C471-5CB2-11D6-B111-003065D18932_at_twcny.rr.com...
> > It may simplify design of smart_ptr a bit and also would be of
great
> > help in
> > defining hares_ptr, scoped_ptr ... in terms od policy-based
smart_ptr
>
> Yes, that is my guess as well. But I'm not yet aware of any
> *implementation* of template typedef's. I'm probably just being a
> nervous nellie, but show me the cash man (just being rhetorical).
Nellie, Nellie, you might be seeing the cash much earlier that you now
think. Can't say much more for now!
> I
> have high hopes for template typedef's increasing the usability of
> policy based designs. But I'm not willing to standardize something
> based on that hope. On the other hand, the promise sounds good
enough
> that I'm not willing to settle for less either. So there we sit ...
> between a rock and a hard place. ;-)
Template typedefs as envisioned today by a number of people are quite
powerful. They allow not only simple type definition, but also partial
specialization.
> Move semantics refers to a general concept whereby resources (e.g.
> memory ownership) can be transferred from one object to another.
[snip]
I find it wonderful that this is being discussed. I guess unnecessary
copying is #1 cause of inefficiency in C++ programs.
> If move semantics become a reality, there are implications across
both
> std and user-defined objects, though backward compatibility should
not
> be a problem. All existing classes will be move ignorant. If move
> happens, I would like to see a smart pointer and containers that can
> take advantage of it. This does not mean that work on smart
pointers
> should halt until move is settled. But it does mean that I'm not
> anxious to standardize more types without considering the
implications
> of move semantics.
... and typedef templates.
Andrei
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk