r/cpp • u/_VZ_ wx | soci | swig • Jun 17 '15
Standardizing Variant: Difficult Decisions
https://www.justsoftwaresolutions.co.uk/cplusplus/standardizing-variant.html
32
Upvotes
r/cpp • u/_VZ_ wx | soci | swig • Jun 17 '15
View all comments
Show parent comment
1
u/[deleted] Jun 19 '15 edited Jun 19 '15
I wonder if iterators of different types as proposed by /u/ericniebler could help here:
endcould return asentinelfor a doubly-linked list, whoseoperator!=(iterator, sentinel)checks ifiteratorpoints to a node, and if that is the case, if that node has a next element or not.