|
Boost : |
From: Gavin Collings (gcollings_at_[hidden])
Date: 2000-01-29 09:39:02
"stephen c. gilardi" <squeege-_at_[hidden]> wrote:
original article:http://www.egroups.com/group/boost/?start=1980
> > > 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
rightmost.
Gavin
-- Gavin Collings gcollings_at_[hidden]
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk