C++26: Standard Library Hardening Experiments
ibobev
81 points
51 comments
August 31, 2026
Related Discussions
Found 5 related stories in 112.0ms across 9,619 title embeddings via pgvector HNSW
- Scaling Memory Safety: AI-Assisted Rewrites of C/C++ Dependencies to Rust ndesaulniers · 12 pts · September 28, 2026 · 50% similar
- Scaling Memory Safety: AI-Assisted Rewrites of C/C++ Dependencies to Rust afdbcreid · 15 pts · August 24, 2026 · 50% similar
- C++26 Contracts: Introduction to Preconditions and Postconditions ibobev · 132 pts · October 15, 2026 · 48% similar
- Fast and Hard Code lumpa · 17 pts · August 22, 2026 · 48% similar
- Fast and Hard Code tosh · 81 pts · August 23, 2026 · 48% similar
Discussion Highlights (4 comments)
pama
30 years late, but I will take it. Contracts look useful and less messy than exceptions.
Cieric
There is a small hint of it at the end, but I really hope compile time contract assertions become more common. I know some languages like spark, dafny and a few others do it and generate implicit contracts for things like divide by 0. I've been experimenting with my own custom language that do these things and going back to c++ every day at work is actually a slight let down because of it.
steveklabnik
One thing that I'm curious about regarding all of this: I thought all of this stuff landed in C++26, yet we are still getting papers like https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2026/p43... > The C++26 draft has not yet had its final ballot This is co-authored by Bjarne, and so I'm sure it's not trivially false, but maybe I am just missing some detail. I know Bjarne was threatening to cast a veto of C++26 over this, but I thought he did not? Anyone who follows the process a bit more than me have some context here?
wakawaka28
This seems like great stuff. Some libraries already do this, so why not standardize the behavior (to the extent it can be done)?