Background: working on a replacement for std.xml. Designing the DOM API.[...]
Another problem that you soon will encounter is that your templated can never be @safe, nothrow or pure again - even if you use the GCAllocator for simple stuff like allocating arrays.
In case you get frustrated about this, you should vote for this PR:
https://github.com/dlang/phobos/pull/3891
