https://blog.thecybershadow.net/2015/04/28/the-amazing-template-that-does-nothing/struct S { ubyte[12] bar; } alias I(alias f) = f; bool foo (ref S s) { static bool prop(const(ubyte)[] f) { return f.length > 1; } return s.bar[].I!prop; }
It's in Phobos: import std.meta: Alias; return s.bar[].Alias!prop