Boost logo

Boost :

From: Gavin Collings (gcollings_at_[hidden])
Date: 2000-01-29 09:39:02

"stephen c. gilardi" <squeege-_at_[hidden]> wrote:
original article:
> > > if (left == this)
> > > delete ptr;

> I think the test has to be "if (left == this && right == this)" or
> something equivalent.

If you're talking about the circular list implementation, then the
simple test should suffice. If the list is unique, both left and right
pointers point to this. If the list has two members, both left and
right point to the other member, in this case, the leftmost element is
the rightmost as well - so if the leftmost disappears, so does the


Gavin Collings

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