Boost logo

Boost :

From: Andrei Alexandrescu (andrewalex_at_[hidden])
Date: 2002-05-01 00:47:36


"Greg Colvin" <greg_at_[hidden]> wrote in message
news:5.1.0.14.0.20020430182855.02e79d80_at_GMMAIL...
> Because for a small (e.g. one tenth of one percent) cost in space
> we get a shared_ptr that can assigned to weak_ptr.

Note that the 1/10 of a percent is a back-of-the-envelope calculation
you made, not a number resulting from any measurement.

> Can we leave all these decisions to the user?
>
> Of course we can.
>
> 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.

A binary-compatible pointer would be perhaps good for some /if built
on top of a flexible, efficient infrastructure/. In fact, I'm not sure
I know what we're arguing about; a policy_based smart pointer
certainly supports defining binary-compatible interfaces.

Andrei


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