diff options
author | jason <jason@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-10-26 19:07:14 +0000 |
---|---|---|
committer | jason <jason@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-10-26 19:07:14 +0000 |
commit | e8c9f615d3856ee3d8635e8ec92bbd2fa2cfa3a9 (patch) | |
tree | 3a188f1a76fba7e0480a3fadf8f3fd90b1751852 /libstdc++-v3 | |
parent | 7a7cd28e1bfb950ed3d49723f8e5c98ccfe47bcf (diff) | |
download | gcc-e8c9f615d3856ee3d8635e8ec92bbd2fa2cfa3a9.tar.gz |
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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@153565 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libstdc++-v3')
11 files changed, 24 insertions, 11 deletions
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index c13bb4005cc..3e29ea50f1e 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,12 @@ +2009-10-26 Jason Merrill <jason@redhat.com> + + Core issue 906 + * 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. + 009-10-20 Paolo Carlini <paolo.carlini@oracle.com> PR libstdc++/41773 diff --git a/libstdc++-v3/include/std/future b/libstdc++-v3/include/std/future index f922dcd74d5..00f5c48bcfd 100644 --- a/libstdc++-v3/include/std/future +++ b/libstdc++-v3/include/std/future @@ -130,9 +130,11 @@ namespace std }; protected: - ~_Future_result_base() = default; + ~_Future_result_base(); }; + inline _Future_result_base::~_Future_result_base() = default; + // TODO: use template alias when available /* template<typename _Res> diff --git a/libstdc++-v3/include/std/system_error b/libstdc++-v3/include/std/system_error index 7f462a20dff..864741129a9 100644 --- a/libstdc++-v3/include/std/system_error +++ b/libstdc++-v3/include/std/system_error @@ -64,7 +64,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) class error_category { protected: - error_category() = default; + error_category(); public: virtual ~error_category() { } @@ -100,6 +100,8 @@ _GLIBCXX_BEGIN_NAMESPACE(std) { return this != &__other; } }; + inline error_category::error_category() = default; + // DR 890. _GLIBCXX_CONST const error_category& system_category() throw (); _GLIBCXX_CONST const error_category& generic_category() throw (); diff --git a/libstdc++-v3/libsupc++/nested_exception.h b/libstdc++-v3/libsupc++/nested_exception.h index 752c595b49b..d4e1347114b 100644 --- a/libstdc++-v3/libsupc++/nested_exception.h +++ b/libstdc++-v3/libsupc++/nested_exception.h @@ -57,9 +57,9 @@ namespace std public: nested_exception() throw() : _M_ptr(current_exception()) { } - nested_exception(const nested_exception&) throw() = default; + nested_exception(const nested_exception&) = default; - nested_exception& operator=(const nested_exception&) throw() = default; + nested_exception& operator=(const nested_exception&) = default; virtual ~nested_exception() = default; diff --git a/libstdc++-v3/testsuite/30_threads/packaged_task/cons/assign_neg.cc b/libstdc++-v3/testsuite/30_threads/packaged_task/cons/assign_neg.cc index 0bad6ba2f32..588a27e0dde 100644 --- a/libstdc++-v3/testsuite/30_threads/packaged_task/cons/assign_neg.cc +++ b/libstdc++-v3/testsuite/30_threads/packaged_task/cons/assign_neg.cc @@ -33,4 +33,4 @@ void test01() } // { dg-error "used here" "" { target *-*-* } 32 } -// { dg-error "deleted function" "" { target *-*-* } 862 } +// { dg-error "deleted function" "" { target *-*-* } 864 } diff --git a/libstdc++-v3/testsuite/30_threads/packaged_task/cons/copy_neg.cc b/libstdc++-v3/testsuite/30_threads/packaged_task/cons/copy_neg.cc index 655ca8c2f95..d0d0622cf59 100644 --- a/libstdc++-v3/testsuite/30_threads/packaged_task/cons/copy_neg.cc +++ b/libstdc++-v3/testsuite/30_threads/packaged_task/cons/copy_neg.cc @@ -32,4 +32,4 @@ void test01() } // { dg-error "used here" "" { target *-*-* } 31 } -// { dg-error "deleted function" "" { target *-*-* } 861 } +// { dg-error "deleted function" "" { target *-*-* } 863 } diff --git a/libstdc++-v3/testsuite/30_threads/promise/cons/assign_neg.cc b/libstdc++-v3/testsuite/30_threads/promise/cons/assign_neg.cc index f2fbf178c36..b97d3ba896e 100644 --- a/libstdc++-v3/testsuite/30_threads/promise/cons/assign_neg.cc +++ b/libstdc++-v3/testsuite/30_threads/promise/cons/assign_neg.cc @@ -33,4 +33,4 @@ void test01() } // { dg-error "used here" "" { target *-*-* } 32 } -// { dg-error "deleted function" "" { target *-*-* } 588 } +// { dg-error "deleted function" "" { target *-*-* } 590 } diff --git a/libstdc++-v3/testsuite/30_threads/promise/cons/copy_neg.cc b/libstdc++-v3/testsuite/30_threads/promise/cons/copy_neg.cc index 17757aed0ad..f94cffb09f3 100644 --- a/libstdc++-v3/testsuite/30_threads/promise/cons/copy_neg.cc +++ b/libstdc++-v3/testsuite/30_threads/promise/cons/copy_neg.cc @@ -32,4 +32,4 @@ void test01() } // { dg-error "used here" "" { target *-*-* } 31 } -// { dg-error "deleted function" "" { target *-*-* } 572 } +// { dg-error "deleted function" "" { target *-*-* } 574 } diff --git a/libstdc++-v3/testsuite/30_threads/shared_future/cons/assign_neg.cc b/libstdc++-v3/testsuite/30_threads/shared_future/cons/assign_neg.cc index 868e0b8a4b8..61563e3e3ab 100644 --- a/libstdc++-v3/testsuite/30_threads/shared_future/cons/assign_neg.cc +++ b/libstdc++-v3/testsuite/30_threads/shared_future/cons/assign_neg.cc @@ -35,4 +35,4 @@ void test01() } // { dg-error "used here" "" { target *-*-* } 34 } -// { dg-error "deleted function" "" { target *-*-* } 481 } +// { dg-error "deleted function" "" { target *-*-* } 483 } diff --git a/libstdc++-v3/testsuite/30_threads/unique_future/cons/assign_neg.cc b/libstdc++-v3/testsuite/30_threads/unique_future/cons/assign_neg.cc index f8f5a690cf4..9783124d2cb 100644 --- a/libstdc++-v3/testsuite/30_threads/unique_future/cons/assign_neg.cc +++ b/libstdc++-v3/testsuite/30_threads/unique_future/cons/assign_neg.cc @@ -35,4 +35,4 @@ void test01() } // { dg-error "used here" "" { target *-*-* } 34 } -// { dg-error "deleted function" "" { target *-*-* } 401 } +// { dg-error "deleted function" "" { target *-*-* } 403 } diff --git a/libstdc++-v3/testsuite/30_threads/unique_future/cons/copy_neg.cc b/libstdc++-v3/testsuite/30_threads/unique_future/cons/copy_neg.cc index 95b5a1d7d9a..4b598997522 100644 --- a/libstdc++-v3/testsuite/30_threads/unique_future/cons/copy_neg.cc +++ b/libstdc++-v3/testsuite/30_threads/unique_future/cons/copy_neg.cc @@ -34,4 +34,4 @@ void test01() } // { dg-error "used here" "" { target *-*-* } 33 } -// { dg-error "deleted function" "" { target *-*-* } 400 } +// { dg-error "deleted function" "" { target *-*-* } 402 } |