Boost logo

Boost :

From: David Abrahams (david.abrahams_at_[hidden])
Date: 2002-01-09 00:15:31

----- Original Message -----
From: "Rainer Deyke" <root_at_[hidden]>

> ----- Original Message -----
> From: "David Abrahams" <david.abrahams_at_[hidden]>

> > ----- Original Message -----
> > From: "Rainer Deyke" <root_at_[hidden]>
> >
> > > > 3. Sorted vector of pointers to values.
> > >
> > > Given that the most common object in a container is already a (smart)
> > > pointer, I see nothing this extra level of indirection buys anyone.
> >
> > A transparent drop-in replacement for tree-based associative containers
> for
> > applications where pointer/reference stability is important.
> Granted. Still, this drop-in replacement should not compromise the design
> of what is basically a new container. The price of a pointer-based
> conatiner (at least one extra pointer per element, one extra indirection
> access) may be unacceptably high in some cases.

Which is why everyone also wants to see the plain sorted vector solution.

> > Also, a way to
> > keep the same data in different sort orders without copying it.
> There already is a way: use a container of pointers. A container of
> pointers can even store (pointers to) instances of subclasses, which makes
> containers of pointers a very common idiom. Encapsulating this idiom in a
> class may make sense, but encapsulating a non-polymorphic version of this
> idiom in a class makes less sense and tying this class to a specific
> container makes even less sense.

Did anyone say this was going to be restricted to non-polymorphic uses? I
don't know what you mean by "tying this class to a specific container". My
proposal has been for container adaptors all along.

Either I am completely missing what you're saying, or you haven't been
paying attention to the thread. You're very argumentative for a guy who
seems to agree with everyone ;-)


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