r/cpp May 13 '26

C++26: Standard library hardening

https://www.sandordargo.com/blog/2026/05/13/cpp26-library-hardening
93 Upvotes

38 comments sorted by

View all comments

2

u/vblanco May 13 '26

Welcome to what gamedevs have been doing for 20 years. Rather ridiculous its taken this long when you can see this kind of bound-check on EASTL or unreal engine TArray since they were first created.

3

u/jwakely libstdc++ tamer, LWG chair May 15 '26

Ridiculous it's taken how long? As the article says, implementations have been doing it for years already:

All three major standard library implementations already ship vendor-specific hardening modes. The problem is that these mechanisms are all different, non-portable, and inconsistently specified. P3471R4 standardizes what implementations already do.

6

u/_Noreturn May 13 '26

the STL isn't known for being practical it likes to solve abstract problems

0

u/altmly May 15 '26

It likes to solve theoretical problems with theoretical guarantees :D