template dupRefBox(alias from, string tempName, alias to)
enum dupRefBox =
unbox!(from, tempName) ~ "if(false) {}\n" ~ dupRefBoxTypeAndArray!(from, tempName ~ "AsInt", int, to) ~ dupRefBoxTypeAndArray!(from, tempName ~ "AsBool", bool, to) ~ dupRefBoxTypeAndArray!(from, tempName ~ "AsStr", string, to) ~ "else " ~ to.stringof ~ " = null;\n";