Skip to content
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

Apply rule-of-5 to ESPreFunctorDecorator #44483

Merged
merged 1 commit into from
Mar 20, 2024

Conversation

Dr15Jones
Copy link
Contributor

PR description:

This avoids a compiler warning under clang.

PR validation:

Compiling code under CMSSW_14_1_CLANG_X_2024-03-19-2300 no longer issues a warning.

This avoids a compiler warning under clang.
@Dr15Jones
Copy link
Contributor Author

please test

@cmsbuild
Copy link
Contributor

cmsbuild commented Mar 20, 2024

cms-bot internal usage

@cmsbuild
Copy link
Contributor

+code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-44483/39572

  • This PR adds an extra 20KB to repository

@cmsbuild
Copy link
Contributor

A new Pull Request was created by @Dr15Jones for master.

It involves the following packages:

  • FWCore/Framework (core)

@smuzaffar, @makortel, @Dr15Jones can you please review it and eventually sign? Thanks.
@wddgit, @missirol, @makortel this is something you requested to watch as well.
@sextonkennedy, @antoniovilela, @rappoccio you are the release manager for this.

cms-bot commands are listed here

ESPreFunctorDecorator(ESPreFunctorDecorator&&) = default;
ESPreFunctorDecorator(ESPreFunctorDecorator const&) = default;
ESPreFunctorDecorator& operator=(const ESPreFunctorDecorator&) = delete; // stop default
ESPreFunctorDecorator& operator=(ESPreFunctorDecorator&&) = delete;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just to double check, this class is copyable and movable via constructor, but not via assignment? I.e. assigning to a caller_ (when not initializing it) is what we want to avoid? But copying caller_ as such is fine?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The original code stopped the regular op= but the compiler warning complained about the default copy constructor. To make the code work, I had to require the copy constructor (and figured move constructor would be fine). Then I just picked the move op= to be treated like the regular op=.

@cmsbuild
Copy link
Contributor

+1

Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-32a07f/38283/summary.html
COMMIT: 4d857dc
CMSSW: CMSSW_14_1_X_2024-03-19-2300/el8_amd64_gcc12
User test area: For local testing, you can use /cvmfs/cms-ci.cern.ch/week1/cms-sw/cmssw/44483/38283/install.sh to create a dev area with all the needed externals and cmssw changes.

Comparison Summary

Summary:

@makortel
Copy link
Contributor

+core

@cmsbuild
Copy link
Contributor

This pull request is fully signed and it will be integrated in one of the next master IBs (tests are also fine). This pull request will now be reviewed by the release team before it's merged. @sextonkennedy, @rappoccio, @antoniovilela (and backports should be raised in the release meeting by the corresponding L2)

@antoniovilela
Copy link
Contributor

+1

@cmsbuild cmsbuild merged commit 47ae9ae into cms-sw:master Mar 20, 2024
11 checks passed
@Dr15Jones Dr15Jones deleted the ruleOf5ESPreFunctorDecorator branch March 26, 2024 20:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants