3

It's written on cppreference that for post C++11 versions of the standard one of the cases when copy constructor is implicitly defined as deleted is the following (constructor for class T):

T has a user-defined move constructor or move assignment operator;

It seems to be true according to compilers, however I didn't manage to find it in the standard...

The place seems to be 12.8/11 (at least for 14882:2011), all other cases seem to be there except the aforementioned one..

Where should I look for this particular case?

ledonter
  • 1,269
  • 9
  • 27

1 Answers1

4

At least as of the draft I have handiest at the moment (N4618), it's at ยง[class.copy.ctor]/6:

If the class definition does not explicitly declare a copy constructor, a non-explicit one is declared implicitly. If the class definition declares a move constructor or move assignment operator, the implicitly declared copy constructor is defined as deleted; otherwise, it is defined as defaulted (8.4).

Jerry Coffin
  • 476,176
  • 80
  • 629
  • 1,111