Safety
cppdashboard.dev/r/2026/11/safetyThis article discusses the theme of safety in C++, particularly in light of recent reports suggesting C++ is unsafe. It highlights changes in C++26 regarding Erroneous Behaviour, which aims to improve safety in the language.
From the article
As you might have got from the “Civil War” section of this trip report, safety in C++ is a massive theme right now. This has been fuelled in part by a US government report (Product Security Bad Practices | CISA) that essentially said that C++ is unsafe and should be avoided for new projects if safety is important.
To this end, there have been a lot of people striving to make C++ safer to compete with languages that offer more safety guarantees such as Rust. For example, in C++26 there is now the concept of Erroneous Behaviour which is basically Undefined Behaviour except that the behaviour is defined by the implementation, and the implementation is recommended to provide diagnostics when encountering it. Sounds confusing? Reading an uninitialized local variable in C++ before C++26 was…
Share this resource