じゃ、
template<class T> int sign(const T& a){return (0 < a) - (a < 0);}
で。std::min()/max()にあわせて < のみ必要ということで。