What's the cool/idiomatic D way to test at compile time if a struct has a member function with a particular signature? Along the lines of:

struct Unrelated
{
   ...
}

template isSomething(T)
{
    enum bool isSomething = is(typeof(
    (inout int = 0)
    {
       T???; // has a function void doSomething(Unrelated* up);
       // etc
    }));
}

struct Thingie
{
   ...
}

static assert(isSomething!(Thingie));

Thanks
Steve

Reply via email to