Here C() is a temporary object which should have been created with no-arg constructor and then I expected a call to move constructor. Yet none of them happened. Can someone exmplain why?
#include <iostream>
using namespace std;
class C{
public:
C(){std::cout<<"No arg\n";}
C(const C& r){std:cout<<"Copy Cons\n";}
C(C&& r){std:cout<<"Move Cons\n";}
};
int main() {
C c(C());
}