I'm trying to write a mixin that will solve the problem but since I can't seem to build up strings progressively it's a huge pain in the ass.
How about this?
Unfortunately this code doesn't work with git head, because it requires both one small std.typecons.wrap bug fix and its one small improvement. But I'll make a PR to fix them soon.