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

A. Jiang via libcxx-commits libcxx-commits at lists.llvm.org
Mon Jun 15 20:06:16 PDT 2026


frederick-vs-ja wrote:

> since they don't tell me how the `noexcept` is strengthened.

It's rarely meaningful to tell how the `noexcept` is strengthened. Exception specifications are almost always strengthened from "nothing" (implicit `noexcept(false)`) to `noexcept` or `noexcept(Cond)`.

The only meaningful cases I know are exception specifications relying on `allocator_traits<A>::propagate_on_container_swap::value` in the standard. We seem to be allowed to strengthening them to unconditional `noexcept` (if not, there should certainly be an LWG issue), and MSVC STL is already doing this.

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


More information about the libcxx-commits mailing list