Boost logo

Boost :

From: David B. Held (dheld_at_[hidden])
Date: 2002-08-01 17:01:03


"Philippe A. Bouchard" <philippeb_at_[hidden]> wrote in message
news:aic71o$sdf$1_at_main.gmane.org...
> [...]
> Is may be unusual for now but once you're used to it, you won't go back
> to shared_ptr<>.

That's a bit of hyperbole.

> I'm targeting here advanced developers, not beginners

Even the most advanced developers I know use boost::smart_ptr, and
they have plenty of good reasons. I'm sure they also use other kinds
of pointers when necessary, but they don't pretend that those custom
pointers are always of generic utility, either.

> and this is why I would like mutable_ptr<> to be boost::pool related.
>
> http://groups.yahoo.com/group/boost/files/ptr/

But mutable_ptr<> has nothing to do with boost::pool, does it?

> P.S.:
> Another thing on flaws in the STL definitions regarding container
> prerequists. It seems they forget the main definition of a container:
> container : something that holds things, especially for transport or
> storage.

The more generic definition of a container as an iterator-generator
is more powerful, and implies the same thing.

> I don't see here nothing that says anything about the fact that copies
> of the elements should be identical.

Why should they be? Shouldn't that be up to the creator of the class?
If you want the elements to be identical, ensure that with your copy c'tor
and/or assignment operator.

> They should implement some pointer traits and add quicksort() in
> <algorithm>.

I would be suprised if boost::type_traits didn't have all the traits you
want. And <algorithm> has std::sort(), which typically implements
introsort(), which is an introspective version of Quicksort that resorts
to heapsort when the input is pathological (i.e. would result in O(n^2)
behaviour with quicksort).

Dave


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