DIP 1018--The Copy Constructor--Community Review Round 1

RazvanN razvan.nitu1305 at gmail.com
Sat Jan 5 13:38:09 UTC 2019


On Saturday, 22 December 2018 at 08:40:21 UTC, Johannes Loher 
wrote:
> Those two statements contradict each other. The first one 
> clearly states that whenever no copy constructor is defined, 
> copying is done by blitting (without exception).

You are right, it's not very well stated, but I thought it would 
be obvious from the examples. The idea here is that when a struct 
does not define any copy constructors and the fields of the 
struct do not define any copy constructors, blitting is employed. 
If at least one field does define a copy constructor, then the 
above mentioned copy constructor is generated. Hope this sheds 
some light.


More information about the Digitalmars-d mailing list