[libcxx-commits] [libcxx] [libc++] Document the strengthened noexcept convention (PR #203869)
Louis Dionne via libcxx-commits
libcxx-commits at lists.llvm.org
Fri Jun 26 09:07:36 PDT 2026
ldionne wrote:
I think I actually quite like the proposal for `// strengthened(reason)`. We should allow some flexibility, like `// strengthened(see-above)` with a comment explaining why we're adding it to a bunch of declarations, for example (this applies to the `<functional>` changes). This encodes both the fact that the `noexcept` is strengthened, but also provides useful information to the reader about why we decided to do it. In many cases, I'd expect that this policy is going to make us more thoughtful about where we add `noexcept` as QoI, since we'll need to actively explain why.
That does makes it more difficult to make a first pass throughout the whole code base for adding those, but I think having a policy so that we add these comments going forward is a step in the right direction.
https://github.com/llvm/llvm-project/pull/203869
More information about the libcxx-commits
mailing list