On Tuesday, 5 November 2019 at 00:34:33 UTC, Nicholas Wilson wrote:
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

Reply via email to