Open
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.
Activity