Boost logo

Boost :

From: Andrei Alexandrescu (andrewalex_at_[hidden])
Date: 2003-02-04 03:35:06


"Beman Dawes" <bdawes_at_[hidden]> wrote in message
news:4.3.2.7.2.20030203161312.023801a0_at_mailhost.esva.net...
> * Should a PBSP supply policies that are prone to be used unsafely?
>
> I'd say "no" is an acceptable answer, at least for something like the T*
> conversion in widely used libraries like the Standard Library and Boost.
>
> * Should a PBSP allow user supplied policies to modify interface, perhaps
> in ways that may be unsafe or even just unfortunate?
>
> That's tougher. At some point I lose interest in a PBSP if it prevents me
> from doing the things I want to do, even if I only want to do them in the
> privacy of my own code.

The original SmartPtr design leaves the onus of choosing the right policy
combination to the application designer. To me, that's a design I find
reasonable and in keep with the spirit of C++. Safer designs are possible
that reject policy combinations that "don't go together" at the price of
being more complicated or less efficient or less flexible.

Andrei


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