3 ms·
> The thing though is that these checks are NOT free and the overhead is not justified for all use cases so forcing them on everyone is not appropriate for C++.
by gpderetta 3y ago
> The thing though is that these checks are NOT free and the overhead is not justified for all use cases so forcing them on everyone is not appropriate for C++.
Well, that's why they should be a flag. The question is whether it should be enabled by default or not.
- fanf2 3y agoIt should be enabled by default, and if you want to index without bounds checking you should have to write something like a.unsafe_at(i)