cms-patatrack / cmssw

CMSSW fork of the Patatrack project
https://patatrack.web.cern.ch/patatrack/index.html
Apache License 2.0
2 stars 5 forks source link

Backport: update propagate_const and add propagate_const_array (#32184) #579

Closed fwyzard closed 4 years ago

fwyzard commented 4 years ago

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 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:

PR validation

Unit test testFWCoreUtilities builds and runs.

If this PR is a backport please specify the original PR and why you need to backport that PR:

Backport cms-sw#32184 .