c++c++11rule-of-three

rule of five and implicitly deleted functions


For my understanding, the rule of five is a guidelince rule. Altough, I've seen that the compiler in some scenarios may delete functions, implicitly. For example, when defining a move-ctor', the copy assignment/ copy ctor' will be deleted.

I'd like to know if there are more scenario as the one mentioned. In other words, in which scenarios does user-defined function may delete implicitly other functions?

Thanks

EDIT:
a reference to some source which covers the subject would be fine too!


Solution

  • For all of the "five", the standard defines the circumstances under which they will be implicitly declared as deleted. I have named and quoted the relevant sections for you from the C++ Standard N4659: