
6 Dec
2009
6 Dec
'09
9:49 a.m.
I hav refactored boost/ratio;hpp to use math::static_gcd instead of the internal detail::static_gcd, and this is working now. In the detail implementation there was also the following metafunctions
template <boost::intmax_t X> struct static_abs { static const boost::intmax_t value = X < 0 ? -X : X; };
template <boost::intmax_t X> struct static_sign { static const boost::intmax_t value = X == 0 ? 0 : (X < 0 ? -1 : 1); };
Is there something similar in Boost.Math or elsewhere?
Nope, but they might make reasonable additions... or maybe they would be better in Boost.Integer I don't know? John.