| C++ language revisions |
|---|
C++29 is the informal name for the open standard revision of the International Organization for Standardization (ISO) and International Electrotechnical Commission (IEC) 14882 standard for the C++ programming language that follows C++26, planned for release in 2029.
The first meeting took place in June 2026 in Brno, Czech Republic.
offset parameter for the #embed directiveimport std;
using std::vector;
struct Base {
int x;
};
struct Derived : public Base {
int y;
};
vector<Derived> v = {
Derived {.x = 1, .y = 2},
Derived {{.x = 1}, .y = 2},
Derived {.x{1}, .y{2}},
};
void operator delete(void* p) noexcept(false); are ill-formed)noexcept specifiers in concept compound requirements= default; assignments for postfix increment/decrement operators (i.e. T operator++(T&, int) = default;consteval-only values:
return_void(), return_value()) are no longer mutually exclusive; this allows coroutines to return in different execution paths co_return; and co_return x;.extern "C" {
template <typename T>
void f(T t);
template <typename T>
void g(void (*f)(T));
}
// extern "Java" is implementation-dependent
// could, for example, be used to implement Java generics
extern "Java" {
template <typename T, typename U>
void foo(T x, U y);
}
volatile pointers are defined to yield and store prospective pointer valueslookup() method to map types std::map<K, V>, std::unordered_map<K, V> and std::flat_map<K, V> which returns a std::optional<V&>std::pointer_tag_pair<Ptr, Tag, N> with constexpr supportname_hint<T> and stack_size_hint for std::thread and std::jthread, which allows setting a thread stack size and a thread namevoid make_hazard_pointer_batch(span<hazard_pointer> batch); and void clear_hazard_pointer_batch(span<hazard_pointer> batch); for handling creation/destruction of hazard pointer batchescopy() and fill() algorithms for std::mdspanstd::simd::iota typehas_error() method for std::expected<T, E>at() accessor for std::ranges::view_interface<D>std::formatter<> specialization for std::error_codestd::format() to be in standard formintptr_t and uintptr_t are now required to be implementedstd::constant_wrapper<T>Among some of the discussed features include Herb Sutter's "metaclasses" proposal, which propose adoptable vocabulary for class boilerplate generation; to facilitate this, code injection for reflection would add token sequence injection into source code. This was later expanded with direct token sequence injection and token sequence macros, similar to syntactic macros, which already exist in languages like Rust.
Of particular interest were adding a more robust way of addressing undefined behavior. A proposal which enumerated all cases of undefined behavior specified in the C++ standard further proposed implicit contract assertions against undefined behavior, as well as unconstrained behavior (which takes the old definition of undefined behavior), as well as "profiles", which allow opt-in disabling unsafe behavior.
{{cite web}}: CS1 maint: multiple names: authors list (link){{cite web}}: CS1 maint: numeric names: authors list (link){{cite web}}: CS1 maint: multiple names: authors list (link){{cite web}}: CS1 maint: multiple names: authors list (link){{cite web}}: CS1 maint: multiple names: authors list (link){{cite web}}: CS1 maint: multiple names: authors list (link){{cite web}}: CS1 maint: multiple names: authors list (link){{cite web}}: CS1 maint: multiple names: authors list (link){{cite web}}: CS1 maint: multiple names: authors list (link){{cite web}}: CS1 maint: multiple names: authors list (link)