The mistake you're making is using a constraint when you should try a specialization:

int signbit(T:Custom)(T x)
{
    return 0;
}


That means to use this specialized function when T is Custom. Now, you just need to merge the overload sets:

import std.math;
alias signbit = std.math.signbit; // this merges local signbit with std.math.signbit


and boom it should compile and call your version.

Reply via email to