While it was 8/12/03 4:56 am throughout the UK, Sam Holden sprinkled

little black dots on a white screen, and they fell thus:

<snip>

It also makes no sense. remove_if, moves the items in the range that

satisfy the predicate to the end of the range (and returns a new end

iterator indicating where those "removed" elements start). A set is

ordered and hence you can't rearrange the elements (since it would then

no longer be ordered).

Correction:

A set is unordered, i.e. there is no such thing as the order of elements

within a set.

If, in normal mathematical notation, we write

S = { 3, 7, 12 }

then this is merely a way of writing it down - as much as 7 appears to

be between 3 and 12, it isn't. We could write the same set as

S = { 7, 12, 3 }

A list is ordered, i.e. the order of elements is defined. So <7, 3, 12>

and <12, 3, 7> are two distinct lists.

Of course, one might use a list in order to implement a set, and may

even automatically sort the underlying list giving a clear order in

which an iterator returns elements. But this order is not part of the

set - it is just provided for the purpose of being able to e.g. search a

set or operate on each element in turn.

Stewart.

--

My e-mail is valid but not my primary mailbox, aside from its being the

unfortunate victim of intensive mail-bombing at the moment. Please keep

replies on the 'group where everyone may benefit.