Problem with const correctness

Thiez thiezz at gmail.com
Mon Dec 10 03:39:22 PST 2012


On Saturday, 8 December 2012 at 21:47:32 UTC, Dan wrote:
> My approach is to have a general dup function. I call it gdup, 
> for global dup so the name does not conflict with the existing 
> dup. It dup's fields recursively. Feel free to have a look and 
> any suggestions appreciated. Would greatly appreciate if 
> seasoned D developers like (Ali,  bearophile, ...) would review 
> - as I use these mixins to simplify development with structs.

What would happen to the recursive dup if the structure contains 
a cycle (e.g. A has a reference to B, which has a reference to C, 
which has a reference to the original A)?


More information about the Digitalmars-d mailing list