[class.copy.ctor] p6 The implicitly declared function does declare the function
Nobody has claimed this yet.
- Dominant language
- TeX
- Stars
- 221
- Forks
- 813
- Avg merge
- 16h 4m
- Merged PRs (30d)
- 36
Description
[class.copy.ctor] p6 says
If the class definition declares a move constructor or move assignment operator, the implicitly declared copy constructor is defined as deleted; otherwise, it is defaulted ([dcl.fct.def]).
I wonder whether the implicitly declared move constructor is considered to declare that function?
struct A{
/* A(A const&); implicitly declared copy constructor */
// Cause the copy constructor to be defined as deleted?
/* A(A&&); implicitly declared move constructor */
};
Anyway, "implicitly declare" is a kind of "declare", I think. Maybe, we could clarify the ambiguity with the following suggestion?
If the class definition has a user-declared move constructor or move assignment operator, the implicitly declared copy constructor is defined as deleted; otherwise, it is defaulted ([dcl.fct.def]).
[class.copy.assign] p2 has a similar issue.
Contributor guide
No contributing guide indexed for this repository
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.
Research direction
Start with [class.copy.ctor] p6 and compare the similar wording in [class.copy.assign] p2. Check whether "declares" is ambiguous for implicitly declared functions, then update the draft wording to distinguish user-declared functions; done means both clauses clearly express the intended rule.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 48/100