r/cpp • • Oct 25 '26

C++ profiles for initialization and invalidation: WIP implementation prototypes already exist in GCC/Clang

https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2026/p4415r0.pdf

In this paper it can be seen some interesting profiles progress for prototypes in Gcc and Clang.

20 Upvotes

29 comments sorted by

View all comments

Show parent comment

8

u/pdimov2 Oct 25 '26

Override could have been an attribute, yes. It's not viral, not part of the type system, and its only purpose is to emit a diagnostic.

const and noexcept are part of the type system, and are therefore viral.

The interesting thing about noexcept was that it wasn't initially part of the type system (hence viral), and was later changed to be. This is a hint that after we add the annotations that we weren't going to add, we will very likely discover that they belong in the type system as well.