Why does this template not have the desired result? I honestly though it would return true.

import std.stdio;

template inBounds(size_t size, T)
{
        enum result = (size >= T.min && size <= T.max);
}

void main(string[] args)
{
        writefln("%s", inBounds!(10, int).result); // false! eh?
}

Reply via email to