Skip to content

Commit

Permalink
fix build
Browse files Browse the repository at this point in the history
no idea why this wasn't found on my (incremental) build

Change-Id: I78079d4c3196584b171d7566245a7f71b9d43649
  • Loading branch information
reneengelhard committed Dec 8, 2018
1 parent 1cd5da7 commit 44266a5
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions tools/source/generic/fract.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -186,8 +186,13 @@ namespace
T den = r.denominator();

// Avoid overflow and preserve normalization
#if BOOST_VERSION >= 106700
T gcd1 = boost::integer::gcd(i.numerator(), den);
T gcd2 = boost::integer::gcd(num, i.denominator());
#else
T gcd1 = boost::math::gcd(i.numerator(), den);
T gcd2 = boost::math::gcd(num, i.denominator());
#endif

bool fail = false;
fail |= o3tl::checked_multiply(i.numerator() / gcd1, num / gcd2, num);
Expand Down

0 comments on commit 44266a5

Please sign in to comment.