Code doesn't work - why?

Robin via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Wed Sep 17 03:42:33 PDT 2014


Hiho,

thank you for your response on my topic.

However, I still do not understand why it didn't work for struct 
value types since I do not perform any mutations on the state 
objects during execution of the code.

The only thing happening with them is that they are getting 
copied bitwise and thus should have the same entries in the 
associative array as the original source, or am I wrong with this?

When value types are copied bitwise then the associative array 
should also be copied that way or at least point to the same 
mapping as the source and thus shouldn't be empty after copying.

What changes are required in order to make it work with struct 
value types as well? I even tried to change getNext to work with 
pointer return values instead but that did not help either.

Regards,
Rob


More information about the Digitalmars-d-learn mailing list