Boost logo

Boost :

From: Rich Sposato (rds_at_[hidden])
Date: 2004-02-04 02:20:15

Joaquín M López Muñoz wrote:

> De: "David B. Held"
> > "Jeremy Maitin-Shepard" <jbms_at_[hidden]> wrote in message
> >

> > > I believe that a library named ``indexed_set,'' which has been
> > > proposed and is pending formal review, provides this functionality
> > > in addition to supporting multiple indices.

> > Are you sure it does the same thing? I was under the impression
> > that Joaquin's library lets you define *additional* indexes, but what
> > if you just want to use an existing index, but it is comparable to
> > something other than the key_type?

> indexed_set does provide this functionality
> (multiple indices aside.) See

>, section "Special lookup operations".
> See also
>, section "Index set operations"
> for a formal definition of the kind of special lookup
> operations provided.

And so indexed_set does provide the ability to lookup by a type
other than the key_type. Which means that if we compared the
various set containers in terms of abilities, flex_set is a
special case of indexed_set where the number of indexes == 1.
>From what I just read about indexed_set, it seems that the best
benefit to using flex_set instead of indexed_set is that
flex_set is simpler and smaller.

We can sort set container classes by abilities to get this:
std::set < flex_set < indexed_set.
We can also sort multiset containers by ability and get this:
std::multiset < flex_multiset < indexed_set.

Rich Sposato

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