As far as i know, a copy constructor is invoked in the following scenarios :
1) Pass by value 2) Return by value 3) When you create and initialize a new obje
A copy constructor might not be invoked when you return by value. Some compilers use return value optimization feature.
Read about "Return Value Optimization"