| February 02, 2006 09:57:02 |
#4 |
| Rahul Vij |
Member Since: Visitor Total Comments: N/A |
RE: while copying the objects if you say X a = b and a... |
X a=b is internally represented as X a(b). The compiler will call a copy constructor and not the overloaded = operator. as for theoperator to be called the LHS object should have been instantiated before the call. but in the above case it is getting instantiated in the same call. so copy constructor will be called doing a shallow copy. a standard one will be generated by the compiler only |
| |