(Optional) Whether or not to copy over the internal state.
A duplicate of this object.
RehashingAA!(int[string]) aa; aa.minimumNeededForRehash = 2; aa["abc"] = 123; aa["def"] = 456; aa["ghi"] = 789; assert(aa.numRehashes == 1); auto aa2 = aa.dup(copyState: false); assert(aa2 == aa); assert(aa2.numRehashes == 1); auto aa3 = aa.dup; //(copyState: false); assert(aa3 == aa); assert(aa3.numRehashes == 0);
Duplicates this. Explicitly copies the internal associative array.
If copyState: false is passed, it will not copy over the internal state such as the number of rehashes and keys added since the last rehash.