https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106611
Arthur O'Dwyer <arthur.j.odwyer at gmail dot com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |arthur.j.odwyer at gmail dot com --- Comment #11 from Arthur O'Dwyer <arthur.j.odwyer at gmail dot com> --- Jiang An wrote: > I've mailed the LWG Chair to submit an LWG issue that requests clarification > of "is known not to throw any exceptions". > FYI, there's at least one library implementor holding the same opinion as > yours. > https://quuxplusone.github.io/blog/2023/04/17/noexcept-false-equals-default/ Quuxplusone here. :) I don't think this is LWG jurisdiction at all. This isn't even a bug in libstdc++'s <type_traits>. This is purely a GCC core-language bug. GCC's builtin __is_nothrow_constructible(T, T&&) simply returns the wrong answer when the selected constructor is "trivial, but noexcept(false)." // https://godbolt.org/z/5szW6KeWq struct C { C(C&&) noexcept(false) = default; }; static_assert(!__is_nothrow_constructible(C, C&&)); // GCC+EDG fail; Clang+MSVC succeed Notice that the builtin returns the correct answer when the selected constructor is "non-trivial, noexcept(false), but still defaulted so we know it can't throw." The problem is specifically with *trivial* ctors. @jwakely, I propose that this issue should be recategorized as a compiler bug. (And I'm also voting effectively "NAD" on LWG3967.)