Boost logo

Boost :

From: Detlef Hoffner (Detlef.Hoeffner_at_[hidden])
Date: 2002-05-01 01:21:01


> What does that cost the user?

> Binary compatibility. If two libraries use a semantically
> identical smart pointer, but the implementation is different,
> then their smart pointers may not be binary compatible with
> each other. And the two libraries may even be two different
> versions of the same library.

This is an important issue and a standard shall provide the best
support to avoid such situations. On the other hand there is the
clear requirement that for different use cases smart pointers
with different functionality (e.g. based on policies) are desired.

Both requirements are valid and importatnt! How can they be brought
together in a meaningful way?

Both requirements can be fulfilled if somehow for each type a
default smart pointer with a specific set of appropiate policies
is provided that shall be used from the average user unless there
are serious reasons not to do so. If this is the case there is the
possibility to provide smart pointers with adapted functionality as
well as a clear compatible choice for an average user of a smart
pointer for a specific type.

Only both a) policy based smart pointers together with
b) one standard way to define and use a default smart pointer
for a specific type will be an acceptable solution.

If this is achieved through typedefs and a naming conventions,
through type traits or through a template specialization is another
question. Important is that there is a standard way to provide a
default smart pointer for a type.

Regards

Detlef


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