C++

C++26 Completes Technical Work Again After Contracts Feedback

The ISO C++ committee has finished its C++26 technical work a second time, after national bodies raised late concerns about the contracts feature. Several new features were also approved for draft C++29.

The ISO C++ committee met in Búzios, Brazil, and again completed technical work on C++26, which it had first finished in March. The earlier draft had not passed its international approval ballot unanimously, and five national bodies voted against it over concerns about contracts, the feature built around pre, post, and contract_assert. The document was sent back for further comments, and most of the six-day meeting focused on answering them.

The committee kept contracts in C++26 and adopted one extension to the feature, a way for programmers to mark a specific contract as always enforced. Several national bodies had named this as their main request. The updated document is expected to go out for a second approval ballot, followed by final editing before ISO publishes it.

The committee also adopted changes for draft C++29. These include labeled break and continue statements, octal literals written with a 0o or 0O prefix, the std::ranges::any_view type, views::slice for extracting subranges, and a get_ptr() member function for std::optional. Some of these features already have support in major C++ implementations. The next full meeting is planned for Istanbul, Türkiye, in March, where work on C++29 will continue.

Source: Sutter’s Mill


Posted

in

by

Tags: