[snip]Hm... neat idea. Somehow, opDispatch can probably be used to make this work even more generically (untested):struct WithAlloc(alias alloc) {auto opDispatch(string s, Args...)(auto ref Args args) if (__traits(compiles, mixin(s ~ "(args, alloc)"))){ mixin("return " ~ s ~ "(args, alloc);"); } } -Steve
Example: https://run.dlang.io/is/RV2xIH