Number_types: Fix VC2017 bug with boost::mp

This commit is contained in:
Andreas Fabri 2023-03-16 10:52:36 +01:00
parent 35a1285a12
commit f734d9d762
1 changed files with 13 additions and 0 deletions

View File

@ -662,10 +662,12 @@ CGAL::Comparison_result
// NT
friend bool operator == (const Sqrt_extension& p, const NT& num)
{ return (p-num).is_zero();}
#if 0
friend bool operator < (const Sqrt_extension& p, const NT& num)
{ return ( p.compare(num) == CGAL::SMALLER ); }
friend bool operator > (const Sqrt_extension& p, const NT& num)
{ return ( p.compare(num) == CGAL::LARGER ); }
#endif
//CGAL_int(NT)
friend bool operator == (const Sqrt_extension& p, CGAL_int(NT) num)
@ -676,6 +678,17 @@ CGAL::Comparison_result
{ return ( p.compare(num) == CGAL::LARGER ); }
};
template <class NT, class ROOT_, class ACDE_TAG_, class FP_TAG >
inline bool operator < (const Sqrt_extension<NT, ROOT_, ACDE_TAG_, FP_TAG>& p, const NT& num)
{
return (p.compare(num) == CGAL::SMALLER);
}
template <class NT, class ROOT_, class ACDE_TAG_, class FP_TAG >
inline bool operator > (const Sqrt_extension<NT, ROOT_, ACDE_TAG_, FP_TAG>& p, const NT& num)
{
return (p.compare(num) == CGAL::LARGER);
}
/*!
* Compute the square of a one-root number.
*/