On Wednesday, 28 January 2015 at 14:35:58 UTC, zhmt wrote:
Anybody help?

__Traits functions are evaluated at compile time so it's not as simple. The best you can do is to generate a string to mixin based on the aggragate members. here i have an example of how you can iterate through the members: https://github.com/BBasile/Iz/blob/master/import/iz/traits.d#L18

Writing an opAssign() operator will be as fast, you just need to remember to keep it in sync with the classe members.

You could also generate the struct programmatically, based on the classes declaration.

Reply via email to