|
Boost Users : |
Subject: Re: [Boost-users] [Intrusive] Obtaining end iterator from value reference
From: Ion Gaztañaga (igaztanaga_at_[hidden])
Date: 2013-05-01 10:13:00
El 01/05/2013 16:01, Nat Linden escribió:
> I was suggesting that if the function can be sure it's a circular
> list, it should still be possible to iterate over all items in the
> list, if the function doesn't care whether it starts at the
> container's official "first" node.
Yes, but the ring isn't formed only with user provided nodes. One item
in the ring will be the "end" node that is stored in the container (one
past the last user element). No one except the container knows which
node is this. Trying to use the end node will provoke UB.
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net