I understand that it probably doesn't fit very well to current debug switches (e.g. _ITERATOR_DEBUG_LEVEL) but asserting on wrong access to optional seems to be even more important than bounds checking containers in some cases, because
- In many cases it will not lead to crash but to some random value based behavior (e.g. for
optional<int>)
- It will not be found via runtime sanitizers.
It's a bit of question/suggestion mix, so sorry about that in advance 😄
I understand that it probably doesn't fit very well to current debug switches (e.g.
_ITERATOR_DEBUG_LEVEL) but asserting on wrong access to optional seems to be even more important than bounds checking containers in some cases, becauseoptional<int>)It's a bit of question/suggestion mix, so sorry about that in advance 😄