Boost logo

Boost :

From: Beman Dawes (bdawes_at_[hidden])
Date: 2003-02-04 10:19:40

At 03:35 AM 2/4/2003, Andrei Alexandrescu wrote:
>"Beman Dawes" <bdawes_at_[hidden]> wrote in message
>> * 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
>> conversion in widely used libraries like the Standard Library and
>> * Should a PBSP allow user supplied policies to modify interface,
>> 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
>> from doing the things I want to do, even if I only want to do them in
>> 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.

Yes, understood.

One of the advantages of a generative approach is the improved ability to
reject invalid policy combinations.

In the generative experiments I tried a couple of years ago, there wasn't a
problem with added complexity or less efficiency, but the result was
definitely less flexible.

A GenVoca or curiously recurring template pattern hierarchy might be able
to solve all those problems, but they were at the boundary of my skill
level, so I never tried them.


Boost list run by bdawes at, gregod at, cpdaniel at, john at