r/cpp • wx | soci | swig • Jun 17 '15

Standardizing Variant: Difficult Decisions

https://www.justsoftwaresolutions.co.uk/cplusplus/standardizing-variant.html
31 Upvotes

56 comments sorted by

View all comments

Show parent comment

2

u/[deleted] Jun 18 '15

std::list is a doubly linked list, so it allows forward and backward iteration.

If two different lists shared the same end() node then you wouldn't be able to decrement from the end().

1

u/whichton Jun 18 '15

Doh! Thanks for the explanation, I need more coffee it seems :)