From 84ded579f304ebca7169b6a9876a141ad7b1612a Mon Sep 17 00:00:00 2001 From: John Maddock Date: Thu, 4 May 2017 11:12:33 +0100 Subject: [PATCH] Qualify recursive calls to avoid ambiguity for types that have their own gcd/lcm --- include/boost/integer/common_factor_rt.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/boost/integer/common_factor_rt.hpp b/include/boost/integer/common_factor_rt.hpp index 761e7dc..b043e31 100644 --- a/include/boost/integer/common_factor_rt.hpp +++ b/include/boost/integer/common_factor_rt.hpp @@ -445,9 +445,9 @@ template inline BOOST_CXX14_CONSTEXPR Integer gcd(Integer const &a, Integer const &b) BOOST_GCD_NOEXCEPT(Integer) { if(a == (std::numeric_limits::min)()) - return a == static_cast(0) ? gcd_detail::gcd_traits::abs(b) : gcd(static_cast(a % b), b); + return a == static_cast(0) ? gcd_detail::gcd_traits::abs(b) : boost::integer::gcd(static_cast(a % b), b); else if (b == (std::numeric_limits::min)()) - return b == static_cast(0) ? gcd_detail::gcd_traits::abs(a) : gcd(a, static_cast(b % a)); + return b == static_cast(0) ? gcd_detail::gcd_traits::abs(a) : boost::integer::gcd(a, static_cast(b % a)); return gcd_detail::optimal_gcd_select(static_cast(gcd_detail::gcd_traits::abs(a)), static_cast(gcd_detail::gcd_traits::abs(b))); }