2 ms·
That is standardese, you get them all bounds checked by using specific compiler flags. Here is for VC++ https://github.com/microsoft/STL/blob/2a62bf7b4079f0a3
by pjmlp 3mo 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/2a62bf7b4079f0a3e33ec80d7daf9ea968805b12/stl/inc/span 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.
- sirwhinesalot 3mo agoI wasn't aware of that VC++ feature, TIL, thanks!