6 Sep
2017
6 Sep
'17
1:58 a.m.
On 5/09/2017 16:25, degski wrote:
On 4 September 2017 at 18:12, Phil Endecott wrote:
But that gets complicated if you need iterators with the normal behaviour.
Wrap a std::vector or a std::array (if fixed size) and forward the begin() and end() iterators of the container. This then will also give you range based for loops (for free) on your type.
That produces iterators with vector behaviour (invalidated on any modification) rather than set behaviour (invalidated only if that element is deleted), which can be a significant behavioural change.