New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
OwnVector should use unique_ptr, not auto_ptr #14009
Conversation
A new Pull Request was created by @wmtan for CMSSW_8_1_X. It involves the following packages: CommonTools/CandAlgos @smuzaffar, @civanch, @Dr15Jones, @lveldere, @cvuosalo, @ssekmen, @mdhildreth, @cmsbuild, @slava77, @davidlange6 can you please review it and eventually sign? Thanks. cms-bot commands are list here #13028 |
@cmsbuild please test |
The tests are being triggered in jenkins. |
-1 Tested at: 225e147 ---> test runtestTqafTopEventSelection had ERRORS you can see the results of the tests here: |
@cmsbuild @davidlange6 Again, this unit test fails in the base IB and has nothing to do with this PR. |
+1 |
auto_ptr is deprecated in C++, but is still used in the framework in three places. One of these is OwnVector, which also supports unique_ptr. This PR changes every user of OwnVector that uses auto_ptr to use unique_ptr instead. and removes support for auto_ptr in OwnVector. It also uses std::make_unique when appropriate.
This PR also changes a very small number of auto_ptr's to unique_ptr's unrelated to OwnVector in files that were modified anyway.
In cases where auto_ptr was passed by reference (a bad practice), the code was modified to pass unique_ptr by value in those cases where ownership is being transferred, and to pass a bare pointer (get()) in cases where ownership is not transferred,
This PR is totally technical.