GCC Newspaper
OCTOBER 6, 2026
Date
/
Architectures
Components
Topics
News & Policy
Other
c++

Implement C++29 conditional noexcept specifiers

Adds support for C++29's conditional noexcept specifiers in compound requirements.

GCC now supports C++29’s P3822R2 paper, enabling conditional noexcept specifiers within compound requirements. This allows more precise control over exception specifications in template metaprogramming. The implementation aligns with Clang’s mangling scheme for these new specifiers.

In Details

This change implements C++29 P3822R2, adding support for conditional noexcept specifiers in compound requirements within the constraint system. The key modification is in cp_parser_compound_requirement and tsubst_compound_requirement to handle a third operand for the noexcept expression. Mangling follows Clang's convention (N for noexcept(true/false), C<expr> for noexcept(<expr>)). The __cpp_concepts macro is updated to 202606L for C++29.

For Context
noexcept specifier
A specifier that indicates whether a function or, in this case, a compound requirement within a template, can throw exceptions. 'noexcept(true)' means it cannot throw, 'noexcept(false)' means it can, and 'noexcept(expression)' means its exception-throwing behavior depends on the evaluation of the expression.
compound requirement
A type constraint in C++ templates that checks if a type satisfies certain properties, such as having specific member functions or types. It's part of the Concepts TS and later C++ standards.
C++29
The anticipated next major version of the C++ programming language standard. Features designated for C++29 are often experimental or proposed in earlier standards (like C++23 or later Technical Specifications).
mangling
The process of encoding a function or other symbol's name with information about its parameters, namespace, and other attributes. This is necessary to distinguish between functions with the same name but different signatures, especially in C++'s name-mangling scheme.
Filed Under: c++featuretemplatesstandard