News for hackers. Stuff that matters.
Re:Metaclasses: Thoughts on generative C++ by signa11 on Friday July 28, 2017 @03:10AM (#14872535)
> I think there really needs to be a "Safe STL" in addition to "Performant STL" that performs range checks.

indeed. for gcc, you can compile stuff with '-D_GLIBCXX_DEBUG' to enable random-iterator bound checks. moreover, random-access-iterators do have the 'at(...)' stuff available for bounds checked access to the containers.

but, yeah, a standardized way would be very useful.

Re:Metaclasses: Thoughts on generative C++ by pjmlp on Friday July 28, 2017 @03:14AM (#14872554)
Visual C++ on debug mode also enables iterator validation and bounds checking for arrays and strings.

It is also possible to explicitly enable them in release code.

https://blogs.msdn.microsoft.com/vcblog/2017/06/28/security-...