On 9/18/16 6:23 AM, Nick Treleaven wrote:
Besides the other comments, we still have to instantiate Awesome!int
somewhere for the tests to run, which could be forgotten or improperly
done, failing silently. (Also int is arbitrary, unhelpful for the
uninitiated).

I don't see that as much of a hurdle seeing as any template written has a few "obvious" types it'll work with. To encapsulate that if needed:

struct Awesome(A, B, C)
{
    private enum ut = is(A == int) && is(B == int) && is(C == int);
    unittest { alias Awe = Awesome!(int, int, int); }

    static if (ut) unittest
    {
        ...
    }
}

Andrei

Reply via email to