import std.typetuple;
import std.traits;

alias TypeTuple!(int, float) MyTypes;
template isCompatible(T)
{
    enum bool isCompatible = allSatisfy!(isImplicitlyConvertible!T, MyTypes);
}

This won't work since the compiler tries to instantiate
isImplicitlyConvertible with a single type (it takes two types).

The reason I'm doing this is to catch bad arguments inside of a static
assert so I can give out better error messages and optionally provide
a tip (based on a version switch). The above won't work, so do you
know of a workaround?

Reply via email to