On 13/12/13 01:23, IgorStepanov wrote:
You can write something like:

void acceptMyType(T)(T arg) if(is(T == MyType))
{
...
}

Yes, this way is complex, but this situation is rare and we can put up with it.

Yes, that's exactly the method I was thinking of. I really found it very beautiful when I saw it inside std.bigint and realized what it was meant to do, but I think it's _very_ prone to being accidentally "corrected" on the assumption that it's meant to be is(T : MyType).

Reply via email to