One of the best C++29 features is available?

jandeboevrie1 pts0 comments

One of the best C++29 features is already available?

Meeting C++

One of the best C++29 features is already available?

published at 18.06.2026 18:10 by Jens Weller<br>Save to Instapaper Pocket

While work on C++26 just got finished, C++29 starts taking shape. And at the C++ Spring Committee meeting in Brno first features were added to the coming standard. One of them is different from other features: its an Annex, not a language or library feature.

And that means, that the proposal it self already contains much of the needed information to be actual useful for lots of folks. While it still will take time for compilers to update their vocabulary. I'm talking about the Undefined Behavior and IFNDR Annexes (P3596) paper, which tries to lists all known occurances of explicit UB and IFNDR in C++ in one place. This also gives an official naming to these undefined behaviors. While IFNDR stands for ill-formed, no diagnostic required, e.g. programs that shouldn't compile - but do on some compilers. This has been a multi year effort, and the paper quotes P1705R1 from 2019 as the first effort to provide such a list.

As part of this work there is also a proposal for dealing with UB: A framework for systematically addressing<br>undefined behaviour in the C++ Standard (P3100R6) : this paper takes up the job of looking for potential solutions to each listed item in the Annex. I don't expect that all UB can be resolved, but its nice to see that the committee has started an effort to address and when possible fix various undefined behaviors in C++. For the start this paper deals with runtime UB only, while UB may also occur during compile or link time. Also IFNDR is out of scope for this paper. Finding and implementing the fixes for UB will take time and relies on adoption in compilers. But it is a great signal for moving towards a safer C++. C++29 will not only include a list of things your code should not do, it will likely also try to address some of the listed occurances, with future standards continueing to move in this direction.

With the undefined behavior sanitizer, other sanitizers, linters and scanners todays tool landscape is already setup pretty well to care about these. The Annex to C++26 now does give those a common name, and a place to look them up. With 110 pages this has been a great effort to list all of the various known behaviors of this category in C++. The Annex does not only provide a listing, but also references and cross references into the standard it self. Lots of these were already present in the long text of the standard it self, now there is a place to look them up. With the size of the proposal and C++29 being in the early stage, the future might bring some more changes and additions to this Annex. And in the future, compilers may diagnose or solve undefined behavior once P3100 gets implemented.

From this years voting for Meeting C++ 2026 and Meeting C++ 2025 I do see that safety and security as a topic has gained a lot more attention than there used to be. This Annex is one more step in improving safety and security in C++, and C++29 should provide more features in this direction. From compilers one could expect to update their warnings and reference the diagnosed UB by name and maybe link? Maybe the GSL can be updated to include a reference to the various behaviors. Also cppreference likely will cover or update these now.

And all of this still will take time. Its great to see that such a document is now existing and can be used for learning, teaching and improved communication. While its taking some time to update the tools and become familiar with the names. Though I do expect that this list will have to be kept up to date, and that new standards may bring new features with possible undefined behaviors and invalid code. From now on the C++ Standard has a home for those, and it becomes easier for folks to get attention on newly found behaviors.

One big gain for C++ is the process it self. For future issues with the standard wording, new features or combinations of C++, there is now a way for turning implicit UB to explicit, known and named UB. Followed with a potential resolution in a future standard.

Join the Meeting C++ patreon community!<br>This and other posts on Meeting C++ are enabled by my supporters on patreon!

Copyright Meetingcpp GmbH 2025 ImprintPrivacy Policy

features standard undefined meeting annex behaviors

Related Articles