The final version works well:

void copyObj(SRC,DEST)(ref SRC src,ref DEST dest)
{
        foreach (i, type; typeof(SRC.tupleof)) {
__traits(getMember, dest, SRC.tupleof[i].stringof) = __traits(getMember, src, SRC.tupleof[i].stringof);
        }
}

thank u , @Marc Schütz .

Reply via email to