Boost logo

Boost :

From: Peter Dimov (pdimov_at_[hidden])
Date: 2002-01-05 10:03:21


From: "Beman Dawes" <bdawes_at_[hidden]>
> At 08:20 AM 1/4/2002, Peter Dimov wrote:
>
> >The other fundamental problem - that some policy combinations are
> >nonsensical (array_access with intrusive_storage) - has three major
> >solutions:
> >
> >1. Do nothing.
>
> I don't think that's acceptable.

I'm not so sure. It looks acceptable - if not perfect - to me. Novice users
are supposed to use "precanned" variants of smart_ptr<> called scoped_ptr<>,
shared_array<>, and so on; the general interface is for power users, and
with power comes responsibility.

I don't mind an implementation catching obvious mistakes as a QoI issue, of
course.

The problem with validating a configuration is that the validator must
recognize each and every policy. This is not possible in the general case.

> >2. Compile-time assertions in the parent class.
>
> I was assuming the first class (policy or otherwise) in the hierarchy that
> has enough information should make the compile-time assertion.

As I see it, the policies are supposed to be as independent as possible; so
the logical "validator" should be the parent class.

--
Peter Dimov
Multi Media Ltd.

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