diff options
author | Nathan Sidwell <nathan@acm.org> | 2017-07-19 13:28:21 +0000 |
---|---|---|
committer | Nathan Sidwell <nathan@gcc.gnu.org> | 2017-07-19 13:28:21 +0000 |
commit | 4a18c06666f71af6337a76be16d4deb67f57eb51 (patch) | |
tree | 788e26e4b28be4752664e9f6f6445a3f394107e5 /gcc/cp/method.c | |
parent | 1eba0867060b1643d71d4185fbc23995248092bf (diff) | |
download | gcc-4a18c06666f71af6337a76be16d4deb67f57eb51.zip gcc-4a18c06666f71af6337a76be16d4deb67f57eb51.tar.gz gcc-4a18c06666f71af6337a76be16d4deb67f57eb51.tar.bz2 |
class.c (add_implicitly_declared_members): Use classtype_has_move_assign_or_move_ctor_p.
* class.c (add_implicitly_declared_members): Use
classtype_has_move_assign_or_move_ctor_p.
(classtype_has_move_assign_or_move_ctor,
classtype_has_user_move_assign_or_move_ctor_p): Merge into ...
(classtype_has_move_assign_or_move_ctor_p): ... this new function.
* cp-tree.h (classtype_has_user_move_assign_or_move_ctor_p):
Replace with ...
(classtype_has_move_assign_or_move_ctor_p): ... this.
* method.c (maybe_explain_implicit_delete, lazily_declare_fn): Adjust.
* tree.c (type_has_nontrivial_copy_init): Adjust.
From-SVN: r250344
Diffstat (limited to 'gcc/cp/method.c')
-rw-r--r-- | gcc/cp/method.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/gcc/cp/method.c b/gcc/cp/method.c index 1dfa186..3c57b41 100644 --- a/gcc/cp/method.c +++ b/gcc/cp/method.c @@ -1809,7 +1809,7 @@ maybe_explain_implicit_delete (tree decl) } else if (DECL_ARTIFICIAL (decl) && (sfk == sfk_copy_assignment || sfk == sfk_copy_constructor) - && classtype_has_user_move_assign_or_move_ctor_p (ctype)) + && classtype_has_move_assign_or_move_ctor_p (ctype, true)) { inform (DECL_SOURCE_LOCATION (decl), "%q#D is implicitly declared as deleted because %qT " @@ -2371,10 +2371,10 @@ lazily_declare_fn (special_function_kind sfk, tree type) move assignment operator, the implicitly declared copy constructor is defined as deleted.... */ if ((sfk == sfk_copy_assignment || sfk == sfk_copy_constructor) - && classtype_has_user_move_assign_or_move_ctor_p (type)) + && classtype_has_move_assign_or_move_ctor_p (type, true)) DECL_DELETED_FN (fn) = true; - /* A destructor may be virtual. */ + /* Destructors and assignment operators may be virtual. */ if (sfk == sfk_destructor || sfk == sfk_move_assignment || sfk == sfk_copy_assignment) |