]> git.ipfire.org Git - thirdparty/gcc.git/commit
Implement P1286R2, Contra CWG1778
authorjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 23 Oct 2019 20:41:26 +0000 (20:41 +0000)
committerjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 23 Oct 2019 20:41:26 +0000 (20:41 +0000)
commitbddb104ab76182f40bdbccf5c64509b4bc4b18bd
tree18bcab37dfecdae810feb52e18f4461f970f4fbe
parent65ab153500f995e8411b35ed943ed6ff0c30e4d4
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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@277351 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/cp/ChangeLog
gcc/cp/method.c
gcc/cp/parser.c
gcc/cp/parser.h
gcc/testsuite/g++.dg/DRs/dr1778.C [new file with mode: 0644]
gcc/testsuite/g++.dg/cpp0x/defaulted23.C
gcc/testsuite/g++.dg/cpp0x/defaulted43.C