I am trying to compare a type with another type at compile time.

My code is

class Q(T)
{
        static auto foo()
        {
                static if (T is A)
                {
                     ...
                }
                static assert(0, "error");
        }
}

and get the error "cannot interpret A at compile time" on the
static if line.

A is an interface.

I simply want to determine if a type is derived from another type
at compile time.

Reply via email to