use cpp rational only if boost is >= 1.78

This commit is contained in:
Dmitry Anisimov 2021-10-08 13:39:35 +02:00
parent 5ac8bb0f7e
commit 1ae8b32859
2 changed files with 10 additions and 0 deletions

View File

@ -50,6 +50,10 @@ typedef unspecified_type Exact_integer;
#else // not DOXYGEN_RUNNING
#if BOOST_VERSION > 107700 && defined(CGAL_USE_BOOST_MP)
// TODO: That is used for testing, it must be removed when merging into master.
typedef BOOST_cpp_arithmetic_kernel::Integer Exact_integer;
#else // BOOST_VERSION <= 107700
#ifdef CGAL_USE_GMPXX
typedef mpz_class Exact_integer;
#elif defined(CGAL_USE_GMP)
@ -67,6 +71,7 @@ typedef CORE::BigInt Exact_integer;
#else
#error "ERROR: Cannot determine a BigInt type!"
#endif // CGAL_USE_CORE
#endif // BOOST_VERSION <= 107700
#endif // not DOXYGEN_RUNNING

View File

@ -55,6 +55,10 @@ namespace CGAL { namespace internal {
template < typename >
struct Exact_field_selector
#if BOOST_VERSION > 107700 && defined(CGAL_USE_BOOST_MP)
// TODO: That is used for testing, it must be removed when merging into master.
{ typedef BOOST_cpp_arithmetic_kernel::Rational Type; };
#else // BOOST_VERSION <= 107700
#ifdef CGAL_USE_GMPXX
{ typedef mpq_class Type; };
#elif defined(CGAL_USE_GMP)
@ -80,6 +84,7 @@ struct Exact_field_selector
#else
{ typedef Quotient<MP_Float> Type; };
#endif
#endif // BOOST_VERSION <= 107700
// By default, a field is a safe choice of ring.
template < typename T >