[libcxx-commits] [libcxx] [libc++] Implement LWG2991: variant copy constructor missing noexcept(see below) (PR #230241)
A. Jiang via libcxx-commits
libcxx-commits at lists.llvm.org
Fri Oct 9 02:50:12 PDT 2026
https://github.com/frederick-vs-ja commented:
> EDIT: I found the following sentence under the issue for `std::expected` (#74768):
>
> > It doesn't necessarily break calls, but it breaks the ABI in the sense that the layout of other types can change if the result of is_trivially_copyable and friends changes.
This should be irrelevant now, IMO, since [LWG4026](https://cplusplus.github.io/LWG/issue4026) is accepted.
> Would this imply that the change to `is_nothrow_copy_constructible_v`, or any trait, could theoretically be ABI breaking, even if unlikely?
Yeah, but I think the break is fine. Users shouldn't rely on that whether the implementation strengthens the exception specification for a particular function when the strengthening is possible. See also [[res.on.exception.handling]/5](https://eel.is/c++draft/res.on.exception.handling#5).
https://github.com/llvm/llvm-project/pull/230241
More information about the libcxx-commits
mailing list