https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85155
Jonathan Wakely <redi at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Resolution|--- |FIXED Target Milestone|--- |10.0 --- Comment #3 from Jonathan Wakely <redi at gcc dot gnu.org> --- GCC accepts this code since this change in GCC 10: Implement P1286R2, Contra CWG1778 The C++11 requirement that an explicit exception-specification on a defaulted function match the implicit one was found to be problematic for std::atomic. This paper, adopted in February, simply removes that requirement: if an explicitly defaulted function has a different exception-specification, that now works just like a user-written function: either it isn't noexcept when it could be, or it is noexcept and will call terminate if an exception is thrown. * method.c (defaulted_late_check): Don't check explicit exception-specification on defaulted function. (after_nsdmi_defaulted_late_checks): Remove. * parser.h (struct cp_unparsed_functions_entry): Remove classes. * parser.c (unparsed_classes): Remove. (push_unparsed_function_queues, cp_parser_class_specifier_1): Adjust. From-SVN: r277351