Test mpz_class when available.

And fix errors compiling with that type.
This commit is contained in:
jzmaddock
2017-05-07 13:15:15 +01:00
parent 84ded579f3
commit 7ccb820893
4 changed files with 29 additions and 7 deletions

View File

@ -336,9 +336,9 @@ namespace boost {
unsigned shifts = 0;
if(!u)
if(u == T(0))
return v;
if(!v)
if(v == T(0))
return u;
shifts = constexpr_min(gcd_traits<T>::make_odd(u), gcd_traits<T>::make_odd(v));
@ -347,9 +347,9 @@ namespace boost {
{
u %= v;
v -= u;
if(!u)
if(u == T(0))
return v << shifts;
if(!v)
if(v == T(0))
return u << shifts;
gcd_traits<T>::make_odd(u);
gcd_traits<T>::make_odd(v);