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
Update propagate_const and add propagate_const_array #32184
Conversation
These proposal stems from the discussion at #32039 and cms-patatrack#574 . It turns out that The latter can be useful to guarantee that the conditions data are not modified by accident, by propagating the constness of their container to the actual data. |
@cmsbuild, please test |
-code-checks Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-32184/19914
Code check has found code style and quality issues which could be resolved by applying following patch(s)
|
cf600dc
to
9497771
Compare
@cmsbuild, please test |
+code-checks Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-32184/19915
|
The tests are being triggered in jenkins.
|
A new Pull Request was created by @fwyzard (Andrea Bocci) for master. It involves the following packages: FWCore/Utilities @makortel, @smuzaffar, @cmsbuild, @Dr15Jones can you please review it and eventually sign? Thanks. cms-bot commands are listed here |
@Dr15Jones Could you review this one? |
Although I think this change is pretty neat and definitely does something very useful, my concern is Though introduced in C++17, the As a possible way to still allow |
Them... we make a PR for the standard ? |
+1 |
Comparison job queued. |
This pull request is fully signed and it will be integrated in one of the next master IBs (but tests are reportedly failing). This pull request will now be reviewed by the release team before it's merged. @silviodonato, @dpiparo, @qliphy (and backports should be raised in the release meeting by the corresponding L2) |
…w#32184) Make most methods of edm::propagate_const<T> constexpr. Add a unit test for edm::propagate_const<incomplete_type *>. Implement edm::propagate_const_array template with similar functionality to edm::propagate_const, but with a subscript operator and support for types like T[], std::unique_ptr<T[]>> and similar array-like types. Add support for get_underlying_safe<propagate_const_array<T>>. Add unit tests for edm::propagate_const_array: - propagate_const_array<T[]> - propagate_const_array<unique_ptr<T[]>> - propagate_const_array<shared_ptr<T[]>> - propagate_const_array<incomplete_type[]>
The tests are being triggered in jenkins.
|
@silviodonato @qliphy can we have this in pre10 ? |
urgent |
well in default IBs it will be a ... unpleasant to brake PRs |
@mrodozov uhm... what ? |
if this failing test start breaking more often in the default IBs (which it didn't do so far, it was failing in ROOT6 IB only) |
+1 |
Comparison job queued. |
Comparison is ready Comparison Summary:
|
+1 |
PR description:
Update
edm::propagate_const<...>
and its unit test:Add
edm::propagate_const_array<...>
to support T[], unique_ptr<T[]>, etc.Implement
edm::propagate_const_array
template with similar functionality toedm::propagate_const
, but with a subscript operator and support for types likeT[]
,std::unique_ptr<T[]>
and similar array-like types.Add support for
get_underlying_safe<propagate_const_array<T>>
.Add unit tests for
edm::propagate_const_array
:propagate_const_array<T[]>
propagate_const_array<unique_ptr<T[]>>
propagate_const_array<shared_ptr<T[]>>
propagate_const_array<incomplete_type[]>
PR validation
Unit test
testFWCoreUtilities
builds and runs.