[libcxx-commits] [libcxx] [libc++] Document the strengthened noexcept convention (PR #203869)

A. Jiang via libcxx-commits libcxx-commits at lists.llvm.org
Wed Jun 24 05:22:38 PDT 2026


frederick-vs-ja wrote:

> FWIW I do think that having a rationale would make this net-positive. I'd be perfectly happy with having short-hands for common stuff like `Throws: Nothing`, e.g. as `noexcept // strengthened(throws nothing)`, and having longer explanations for why we think e.g. conditional noexcepts are a good idea in some places. That would provide substantial value IMO, since it tells me the intention/rationale of the author.

I think I like the explanations. But IIUC in most cases of strengthening (~99.5% in MSVC STL for now), the comments will say `// strengthened(throws nothing)`, and I don't think it will be helpful to say `(throws nothing)`.

https://github.com/llvm/llvm-project/pull/203869


More information about the libcxx-commits mailing list