isocpp / isocpp/CppCoreGuidelines
Split off 2 new rules from rule F.18
@hsutter is already working on this.
Since Feb 18, 2021.
- Dominant language
- CSS
- Stars
- 45.3k
- Forks
- 5.6k
- PR merge metrics
- No merged PRs in 30d
Description
Rule F.18 is about "For “will-move-from” parameters, pass by X&& and std::move the parameter". There are 3 enforcements defined for this rule:
- Flag all X&& parameters (where X is not a template type parameter name) where the function body uses them without std::move.
- Flag access to moved-from objects.
- Don’t conditionally move from objects
The first one is indeed about this rule, but the second and third one are not about this rule. They should have been rules on their own with an own explanation. I am writing a code checker for the Core Guidelines and I know for sure that we will get questions why for instance accessing a move-from object later on in the same function (enforcement 2) has anything to do with "will-move-from" parameters.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.