← Back to context

Comment by pjmlp

2 days ago

That is standardese, you get them all bounds checked by using specific compiler flags.

Here is for VC++

https://github.com/microsoft/STL/blob/2a62bf7b4079f0a3e33ec8...

You just have to define the proper iterator level for enabling bounds checking.

Other compilers have similar approaches.

I chose VC++ on purpose, because it is what I know better, and is famously trailing behind C++26 features.

Then there are the Tclass, Cclass, Qclass, from all those C++ frameworks pre C++98.

However plenty devs seem allergic to learn about how to use their compilers.