https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92895
--- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> --- (In reply to Lewis Baker from comment #0) > stop_token::_Stop_cb::_M_callback > > The function pointer type could be declared noexcept here. > This might avoid some extra exception-handling codegen being generated in > _M_request_stop() when this function pointer is invoked. It doesn't hurt to make it noexcept, but it doesn't affect codegen either, at least not with GCC. Termination is done in the unwind tables, not by adding extra EH code. It might help Clang though. > stop_source::operator=(stop_source&& rhs) > > This implementation just does a swap() which leaves rhs with the previous > state > of *this rather than leaving rhs as an empty state. Oops, we fixed the same problem for stop_token::operator= but not here. I suggested defining the assignment operator as defaulted, because the shared_ptr member already does the right thing here.