This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/38796] [c++0x] defaulted operator= with non-default return type accepted
- From: "jason at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 26 Oct 2009 19:07:28 -0000
- Subject: [Bug c++/38796] [c++0x] defaulted operator= with non-default return type accepted
- References: <bug-38796-1771@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #2 from jason at gcc dot gnu dot org 2009-10-26 19:07 -------
Subject: Bug 38796
Author: jason
Date: Mon Oct 26 19:07:14 2009
New Revision: 153565
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=153565
Log:
PR c++/38796, Core issue 906
gcc/cp
* cp-tree.h (DECL_DEFAULTED_OUTSIDE_CLASS_P): New.
(DECL_DEFAULTED_IN_CLASS_P): New.
* class.c (user_provided_p): Non-static.
(check_methods): Use it.
(check_bases_and_members): Check defaulted fns.
(defaultable_fn_p): Move and rename to...
* method.c (defaultable_fn_check): ...this.
(defaulted_late_check): New.
* pt.c (tsubst_decl): Call it.
* decl2.c (grokfield): Adjust.
* decl.c (cp_finish_decl): Adjust.
(grok_special_member_properties): Use user_provided_p.
libstdc++-v3
* include/std/future (~Future_result_base): Default outside class
body.
* include/std/system_error (error_category()): Likewise.
* libsupc++/nested_exception.h (nested_exception): Remove
exception specifications from defaulted methods.
Added:
trunk/gcc/testsuite/g++.dg/cpp0x/defaulted15.C
trunk/gcc/testsuite/g++.dg/cpp0x/defaulted16.C
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/class.c
trunk/gcc/cp/cp-tree.h
trunk/gcc/cp/decl.c
trunk/gcc/cp/decl2.c
trunk/gcc/cp/method.c
trunk/gcc/cp/pt.c
trunk/gcc/testsuite/ChangeLog
trunk/libstdc++-v3/ChangeLog
trunk/libstdc++-v3/include/std/future
trunk/libstdc++-v3/include/std/system_error
trunk/libstdc++-v3/libsupc++/nested_exception.h
trunk/libstdc++-v3/testsuite/30_threads/packaged_task/cons/assign_neg.cc
trunk/libstdc++-v3/testsuite/30_threads/packaged_task/cons/copy_neg.cc
trunk/libstdc++-v3/testsuite/30_threads/promise/cons/assign_neg.cc
trunk/libstdc++-v3/testsuite/30_threads/promise/cons/copy_neg.cc
trunk/libstdc++-v3/testsuite/30_threads/shared_future/cons/assign_neg.cc
trunk/libstdc++-v3/testsuite/30_threads/unique_future/cons/assign_neg.cc
trunk/libstdc++-v3/testsuite/30_threads/unique_future/cons/copy_neg.cc
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38796