Hmm.. we should have some kind of `TargetType` template which does what this template does, and then this kind of template would be implemented as `static if (is(TargetType!T == inout))`. `ElementType` comes close but I'm not sure if it works with pointers and associative array. This would avoid code duplication for future templates like this one.