https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113789
--- Comment #4 from Marek Polacek <mpolacek at gcc dot gnu.org> --- Um, that's not it. Since struct AutoPtr { AutoPtr() = default; AutoPtr(AutoPtr&) {} }; template<class T> int f (T p) { throw p; } void g () { f (AutoPtr ()); } is rejected in C++23, we probably should have rejected the decltype(throw p, 1) candidate and never get to the throw in the body of the function f.