Answer the question
In order to leave comments, you need to log in
If there are any members of the class, the move constructor will not be generated automatically?
1) Custom explicit constructor
2) Custom move constructor
3) Custom copy constructor
4) Custom assignment operator
5) Custom move assignment operator
6) Custom destructor
7) Primitive type private field
Answer the question
In order to leave comments, you need to log in
Implicitly-declared move constructor
If no user-defined move constructors are provided for a class type (struct, class, or union), and all of the following is true:
- there are no user-declared copy constructors;
- there are no user-declared copy assignment operators;
- there are no user-declared move assignment operators;
- there is no user-declared destructor.
then the compiler will declare a move constructor as a non-explicit inline public member of its class with the signature T::T(T&&).
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question