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
Add copy constructor to edmNew::DetSetVector #23333
Conversation
The code-checks are being triggered in jenkins. |
+code-checks Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-23333/4835 |
A new Pull Request was created by @makortel (Matti Kortelainen) for master. It involves the following packages: DataFormats/Common @cmsbuild, @smuzaffar, @Dr15Jones can you please review it and eventually sign? Thanks. cms-bot commands are listed here |
@cmsbuild, please test |
The tests are being triggered in jenkins. |
So you have essentially made a strangely named assignment operator? |
Essentially yes. Motivation for not enabling the assignment operator (or copy constructor) is to (continue to) prevent accidental copies (e.g. forgotten |
I'm afraid I'm not convinced by that argument. I believe if we want to do copies then we should use the standard C++ syntax for such. |
But we want to do copies only in very specific circumstances (that may go away in the mid-to-far future). Providing standard copy constructor and assignment operator would allow misuse and bugs in the "performance regression" sense. |
@makortel we have the same problems with ever std container we use now. Given that the standard operations are not used anywhere in the code at present, putting them in will not cause a regression in our present code base. |
in fact, it might make sense to |
can I quote this as a justification to enable GCC's Concepts in the production architecture ? |
Comparison job queued. |
Comparison is ready Comparison Summary:
|
The code-checks are being triggered in jenkins. |
Declared the |
+code-checks Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-23333/4862 |
Pull request #23333 was updated. @cmsbuild, @smuzaffar, @Dr15Jones can you please check and sign again. |
Please test |
The tests are being triggered in jenkins. |
+1 |
This pull request is fully signed and it will be integrated in one of the next master IBs after it passes the integration tests. This pull request will now be reviewed by the release team before it's merged. @davidlange6, @slava77, @smuzaffar, @fabiocos (and backports should be raised in the release meeting by the corresponding L2) |
Comparison job queued. |
Comparison is ready Comparison Summary:
|
+1 |
This PR adds a
way to make copy ofcopy constructor toedmNew::DetSetVector
. Such a functionality is needed in the GPU pixel tracking work. Because the change implies recompiling ~half of the universe, I submit it here already now so that we could benefit getting it to a CMSSW pre-release (thus avoiding the aforementioned private recompilation).The "copying" is implemented as the following patternedmNew::DetSetVector<T> copy;
copy.replaceFrom(original);
to allow putting the thecopy
to anstd::unique_ptr<T>
, and still keeping the copy constructor and assignment operator disabled (to prevent accidental copies).Tested in 10_2_0_pre3, no changes expected.
@fwyzard @felicepantaleo @VinInn