diff --git a/Number_types/include/CGAL/Quotient.h b/Number_types/include/CGAL/Quotient.h index de1e6adbebe..c27dc82af73 100644 --- a/Number_types/include/CGAL/Quotient.h +++ b/Number_types/include/CGAL/Quotient.h @@ -33,6 +33,9 @@ #include #include +#ifdef CGAL_USE_BOOST_MP +#include +#endif // CGAL_USE_BOOST_MP namespace CGAL { @@ -46,6 +49,15 @@ template < typename NT > inline void simplify_quotient(NT &, NT &) {} +#ifdef CGAL_USE_BOOST_MP +inline void +simplify_quotient(boost::multiprecision::cpp_int & a, boost::multiprecision::cpp_int & b) { + const boost::multiprecision::cpp_int r = boost::multiprecision::gcd(a, b); + a /= r; + b /= r; +} +#endif // CGAL_USE_BOOST_MP + // This one should be replaced by some functor or tag. // Meanwhile, the class is specialized for Gmpz, mpz_class, leda_integer. template < typename NT > diff --git a/Number_types/include/CGAL/boost_mp.h b/Number_types/include/CGAL/boost_mp.h index d64cdf650ae..c650273aa9f 100644 --- a/Number_types/include/CGAL/boost_mp.h +++ b/Number_types/include/CGAL/boost_mp.h @@ -794,14 +794,6 @@ namespace internal { #ifdef CGAL_USE_BOOST_MP -template < > -inline void -simplify_quotient(boost::multiprecision::cpp_int & a, boost::multiprecision::cpp_int & b) { - const boost::multiprecision::cpp_int r = boost::multiprecision::gcd(a, b); - a /= r; - b /= r; -} - template< > class Real_embeddable_traits< Quotient > : public INTERN_QUOTIENT::Real_embeddable_traits_quotient_base< Quotient > {