commit | 25199ea87e20f43b1b55790aa6b6299568dcc983 | [log] [tgz] |
---|---|---|
author | Jiakai Zhang <jiakaiz@google.com> | Tue May 28 17:11:49 2024 +0000 |
committer | Treehugger Robot <android-test-infra-autosubmit@system.gserviceaccount.com> | Tue May 28 19:43:36 2024 +0000 |
tree | 5f0f526c9e8897d0c3de14b45e82f72dfbc19186 | |
parent | 48b13873a0981c156285d9dab66e6e7602b3cd82 [diff] |
Add move constructor back to art::tools::SystemProperties. To allow deleting an object through pointer to base, we have added a virtual destructor to this class (https://en.cppreference.com/w/cpp/language/destructor#Virtual_destructors). However, this essentially deletes the implicit move constructor (https://en.cppreference.com/w/cpp/language/move_constructor#Implicitly-declared_move_constructor), so the implicit copy constructor is currently being picked, and we get Wdeprecated-copy-with-dtor because the implicit copy constructor is deprecated for classes with a user-declared destructor (https://en.cppreference.com/w/cpp/language/copy_constructor#Implicitly-defined_copy_constructor). This CL adds the move constructor back. Bug: 311377497 Change-Id: I02470aa1aa62009876834887b7a2ae1ee920060d Test: Build and see no more Wdeprecated-copy-with-dtor