As the subject,the related code is:
#include <iostream>     
class ABC     
{  public:  
    ABC() 
    {
        std::cout<< "default construction" << std::endl;
    }
    ABC(const ABC& a) 
    {
        std::cout << "copy construction" << std::endl;
    } 
    ABC(const ABC&& a) 
    {
        std::cout << "move construction" << std::endl;
    }
};                         
int main()   
{  
   ABC c1 = ABC();  
   return 0;  
}
Output with -fno-elide-constructors -std=c++11
default construction
move construction
If i remove the move constructor above, then the output is:
default construction
copy construction
why copy construction could be used while move constructor has been removed?You see, if there is a user defined move constructor, the compiler prefer to use move constructor.
As per some documentation,compiler provides a default move constructor.**So why don't the compiler use the default move constructor?
I am a novice in C++.I would be grateful to have some help with this question.
 
    