class AAA { public: explicit AAA(const AAA&) {} AAA(int) {} }; int main() { AAA a = 1; return 0; }
In the above code, as I unders
Looks like copy constructor is never called . Only constructor is called . The following code may call copy constructor
AAA a = 1; AAA ab = a;
Not sure why G++ is compiling it .