Boost logo

Boost :

From: Terje Slettebø (tslettebo_at_[hidden])
Date: 2003-01-17 21:48:51


>From: "David Abrahams" <dave_at_[hidden]>
>
> Please don't take this to mean I'm against a
> policy-based smart pointer; quite the opposite. I've
> said all along it would be great to have one in boost.
> I've even wished I had an appropriate occasionally.
>
> I just don't want to trivialize what I perceive to be
> valid concerns, either. Understanding the costs of
> complexity should be as important to the designer of
> policy-based classes as to everyone else, if not more
> so.

I understand the concern. For one thing, we don't have template typedefs,
yet, although me may get a similar effect (if not the same type) with e.g.:

template<class T>
struct shared_ptr : smart_ptr<T, policies...> {};

etc.

However, I also understand the concern regarding understanding the policies
available, their responsibilities and interaction. Therefore, convenience
templates like the above could make it easier to use them, while still
allowing new convenience templates/template typedefs to be made, or new
policy implementations added.

Having such convenience templates is a bit like having a small configuration
DSL on top of the policy-based smart pointer, to use the terminology in C&E.

Regards,

Terje


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk