
1 May
2013
1 May
'13
2:13 p.m.
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.