Copy constructor in D. Why it is necessary to have it.

Eldar Insafutdinov e.insafutdinov at gmail.com
Tue Sep 30 12:37:50 PDT 2008


http://www.everfall.com/paste/id.php?m46jrb36o7qu

This is a short example. It has all the comments inside. Since "in" keyword tells the compiler to make a copy of an class object - a new object is created. But constructor for this object is not called(you can check it). In my opinion it is a big issue and needs to be improved.



More information about the Digitalmars-d mailing list