Hardened standard library is going to make the times when I am forced to use C++ a lot more pleasant. Does anyone know how you will enable it? I think it's pretty much guaranteed that they're not going to take the sensible route of making it opt-out, and if it's too difficult to enable nobody is going to bother.
this post was submitted on 18 Feb 2025
7 points (100.0% liked)
C++
1869 readers
1 users here now
The center for all discussion and news regarding C++.
Rules
- Respect instance rules.
- Don't be a jerk.
- Please keep all posts related to C++.
founded 2 years ago
MODERATORS
see https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2024/p3471r2.html#enabling-hardening
Much like a freestanding implementation, the way to request a hardened implementation is left for the implementation to define. For example, similarly to -ffreestanding, we expect that most toolchains would provide a compiler flag like -fhardened, but other alternatives like a -D_LIBCPP_HARDENING_MODE= macro would also be conforming.
Well let's hope they don't all choose different options...