From 58e37209623faa157f6f147de117abe9b4d489f4 Mon Sep 17 00:00:00 2001 From: Marc Glisse Date: Sat, 11 Apr 2020 11:24:26 +0200 Subject: [PATCH 01/17] Replace boost::totally_ordered* with <=> for Gmpq --- Number_types/include/CGAL/GMP/Gmpq_type.h | 46 ++++++++++++++++++++++- 1 file changed, 44 insertions(+), 2 deletions(-) diff --git a/Number_types/include/CGAL/GMP/Gmpq_type.h b/Number_types/include/CGAL/GMP/Gmpq_type.h index 54776eb5b78..156e24c02ba 100644 --- a/Number_types/include/CGAL/GMP/Gmpq_type.h +++ b/Number_types/include/CGAL/GMP/Gmpq_type.h @@ -35,6 +35,10 @@ #include #include +#if __cpp_impl_three_way_comparison >= 201907L +# include +#endif + #if defined(BOOST_MSVC) # pragma warning(push) # pragma warning(disable:4146) @@ -61,8 +65,17 @@ private: class Gmpq - : Handle_for, - boost::totally_ordered1< Gmpq + : Handle_for +#if __cpp_impl_three_way_comparison >= 201907L + , boost::field_operators2< Gmpq, int + , boost::field_operators2< Gmpq, long + , boost::field_operators2< Gmpq, long long + , boost::field_operators2< Gmpq, double + , boost::field_operators2< Gmpq, Gmpz + , boost::field_operators2< Gmpq, Gmpfr + > > > > > > +#else + , boost::totally_ordered1< Gmpq , boost::ordered_field_operators2< Gmpq, int , boost::ordered_field_operators2< Gmpq, long , boost::ordered_field_operators2< Gmpq, long long @@ -70,6 +83,7 @@ class Gmpq , boost::ordered_field_operators2< Gmpq, Gmpz , boost::ordered_field_operators2< Gmpq, Gmpfr > > > > > > > +#endif { typedef Handle_for Base; public: @@ -223,7 +237,11 @@ public: Gmpq& operator/=(const Gmpq &q); bool operator==(const Gmpq &q) const noexcept { return mpq_equal(this->mpq(), q.mpq()) != 0;} +#if __cpp_impl_three_way_comparison >= 201907L + std::strong_ordering operator<=>(const Gmpq&q) const noexcept { return mpq_cmp(this->mpq(), q.mpq()) <=> 0; } +#else bool operator< (const Gmpq &q) const noexcept { return mpq_cmp(this->mpq(), q.mpq()) < 0; } +#endif double to_double() const noexcept; Sign sign() const noexcept; @@ -245,54 +263,78 @@ public: Gmpq& operator-=(int z){return (*this)-= Gmpq(z);} Gmpq& operator*=(int z){return (*this)*= Gmpq(z);} Gmpq& operator/=(int z){return (*this)/= Gmpq(z);} +#if __cpp_impl_three_way_comparison >= 201907L + std::strong_ordering operator<=>(int z) const noexcept { return mpq_cmp_si(mpq(),z,1) <=> 0; } +#else bool operator==(int z) const {return mpq_cmp_si(mpq(),z,1)==0;} bool operator< (int z) const {return mpq_cmp_si(mpq(),z,1)<0;} bool operator> (int z) const {return mpq_cmp_si(mpq(),z,1)>0;} +#endif // Interoperability with long Gmpq& operator+=(long z){return (*this)+= Gmpq(z);} Gmpq& operator-=(long z){return (*this)-= Gmpq(z);} Gmpq& operator*=(long z){return (*this)*= Gmpq(z);} Gmpq& operator/=(long z){return (*this)/= Gmpq(z);} +#if __cpp_impl_three_way_comparison >= 201907L + std::strong_ordering operator<=>(long z) const noexcept { return mpq_cmp_si(mpq(),z,1) <=> 0; } +#else bool operator==(long z) const {return mpq_cmp_si(mpq(),z,1)==0;} bool operator< (long z) const {return mpq_cmp_si(mpq(),z,1)<0;} bool operator> (long z) const {return mpq_cmp_si(mpq(),z,1)>0;} +#endif // Interoperability with long long Gmpq& operator+=(long long z){return (*this)+= Gmpq(z);} Gmpq& operator-=(long long z){return (*this)-= Gmpq(z);} Gmpq& operator*=(long long z){return (*this)*= Gmpq(z);} Gmpq& operator/=(long long z){return (*this)/= Gmpq(z);} +#if __cpp_impl_three_way_comparison >= 201907L + std::strong_ordering operator<=>(long long z) const noexcept { return *this <=> Gmpq(z); } +#else bool operator==(long long z) const {return (*this)== Gmpq(z);} bool operator< (long long z) const {return (*this)< Gmpq(z);} bool operator> (long long z) const {return (*this)> Gmpq(z);} +#endif // Interoperability with double Gmpq& operator+=(double d){return (*this)+= Gmpq(d);} Gmpq& operator-=(double d){return (*this)-= Gmpq(d);} Gmpq& operator*=(double d){return (*this)*= Gmpq(d);} Gmpq& operator/=(double d){return (*this)/= Gmpq(d);} +#if __cpp_impl_three_way_comparison >= 201907L + std::strong_ordering operator<=>(double d) const noexcept { return *this <=> Gmpq(d); } +#else bool operator==(double d) const {return (*this)== Gmpq(d);} bool operator< (double d) const {return (*this)< Gmpq(d);} bool operator> (double d) const {return (*this)> Gmpq(d);} +#endif // Interoperability with Gmpz Gmpq& operator+=(const Gmpz&); Gmpq& operator-=(const Gmpz&); Gmpq& operator*=(const Gmpz&); Gmpq& operator/=(const Gmpz&); +#if __cpp_impl_three_way_comparison >= 201907L + std::strong_ordering operator<=>(const Gmpz& z) const noexcept { return *this <=> Gmpq(z); } +#else bool operator==(const Gmpz &z) const {return (*this)== Gmpq(z);} bool operator< (const Gmpz &z) const {return (*this)< Gmpq(z);} bool operator> (const Gmpz &z) const {return (*this)> Gmpq(z);} +#endif // Interoperability with Gmpfr Gmpq& operator+=(const Gmpfr &f){return (*this)+= Gmpq(f);} Gmpq& operator-=(const Gmpfr &f){return (*this)-= Gmpq(f);} Gmpq& operator*=(const Gmpfr &f){return (*this)*= Gmpq(f);} Gmpq& operator/=(const Gmpfr &f){return (*this)/= Gmpq(f);} +#if __cpp_impl_three_way_comparison >= 201907L + std::strong_ordering operator<=>(const Gmpfr& f) const noexcept { return 0 <=> mpfr_cmp_q(f.fr(),mpq()); } +#else bool operator==(const Gmpfr &f) const {return mpfr_cmp_q(f.fr(),mpq())==0;} bool operator< (const Gmpfr &f) const {return mpfr_cmp_q(f.fr(),mpq())>0;} bool operator> (const Gmpfr &f) const {return mpfr_cmp_q(f.fr(),mpq())<0;} +#endif }; From c1f2fdecbafe5ff7ae2a95bb98ef0c6f107ab58b Mon Sep 17 00:00:00 2001 From: Marc Glisse Date: Sat, 11 Apr 2020 12:12:27 +0200 Subject: [PATCH 02/17] Make mixed comparisons friends for Lazy_exact_nt --- Number_types/include/CGAL/Lazy_exact_nt.h | 141 ++++++++++------------ 1 file changed, 63 insertions(+), 78 deletions(-) diff --git a/Number_types/include/CGAL/Lazy_exact_nt.h b/Number_types/include/CGAL/Lazy_exact_nt.h index b0c401a3797..1a511325de9 100644 --- a/Number_types/include/CGAL/Lazy_exact_nt.h +++ b/Number_types/include/CGAL/Lazy_exact_nt.h @@ -438,6 +438,69 @@ public : return *this = new Lazy_exact_Div(*this, b); } + // Mixed comparisons with int. + friend bool operator<(const Lazy_exact_nt& a, int b) + { + CGAL_BRANCH_PROFILER(std::string(" failures/calls to : ") + std::string(CGAL_PRETTY_FUNCTION), tmp); + Uncertain res = a.approx() < b; + if (is_certain(res)) + return res; + CGAL_BRANCH_PROFILER_BRANCH(tmp); + return a.exact() < b; + } + + friend bool operator>(const Lazy_exact_nt& a, int b) + { + CGAL_BRANCH_PROFILER(std::string(" failures/calls to : ") + std::string(CGAL_PRETTY_FUNCTION), tmp); + Uncertain res = b < a.approx(); + if (is_certain(res)) + return get_certain(res); + CGAL_BRANCH_PROFILER_BRANCH(tmp); + return b < a.exact(); + } + + friend bool operator==(const Lazy_exact_nt& a, int b) + { + CGAL_BRANCH_PROFILER(std::string(" failures/calls to : ") + std::string(CGAL_PRETTY_FUNCTION), tmp); + Uncertain res = b == a.approx(); + if (is_certain(res)) + return get_certain(res); + CGAL_BRANCH_PROFILER_BRANCH(tmp); + return b == a.exact(); + } + + + // Mixed comparisons with double. + friend bool operator<(const Lazy_exact_nt& a, double b) + { + CGAL_BRANCH_PROFILER(std::string(" failures/calls to : ") + std::string(CGAL_PRETTY_FUNCTION), tmp); + Uncertain res = a.approx() < b; + if (is_certain(res)) + return res; + CGAL_BRANCH_PROFILER_BRANCH(tmp); + return a.exact() < b; + } + + friend bool operator>(const Lazy_exact_nt& a, double b) + { + CGAL_BRANCH_PROFILER(std::string(" failures/calls to : ") + std::string(CGAL_PRETTY_FUNCTION), tmp); + Uncertain res = b < a.approx(); + if (is_certain(res)) + return res; + CGAL_BRANCH_PROFILER_BRANCH(tmp); + return b < a.exact(); + } + + friend bool operator==(const Lazy_exact_nt& a, double b) + { + CGAL_BRANCH_PROFILER(std::string(" failures/calls to : ") + std::string(CGAL_PRETTY_FUNCTION), tmp); + Uncertain res = b == a.approx(); + if (is_certain(res)) + return res; + CGAL_BRANCH_PROFILER_BRANCH(tmp); + return b == a.exact(); + } + // % kills filtering Self & operator%=(const Self& b) { @@ -562,84 +625,6 @@ operator%(const Lazy_exact_nt& a, const Lazy_exact_nt& b) } - -// Mixed operators with int. -template -bool -operator<(const Lazy_exact_nt& a, int b) -{ - CGAL_BRANCH_PROFILER(std::string(" failures/calls to : ") + std::string(CGAL_PRETTY_FUNCTION), tmp); - Uncertain res = a.approx() < b; - if (is_certain(res)) - return res; - CGAL_BRANCH_PROFILER_BRANCH(tmp); - return a.exact() < b; -} - -template -bool -operator>(const Lazy_exact_nt& a, int b) -{ - CGAL_BRANCH_PROFILER(std::string(" failures/calls to : ") + std::string(CGAL_PRETTY_FUNCTION), tmp); - Uncertain res = b < a.approx(); - if (is_certain(res)) - return get_certain(res); - CGAL_BRANCH_PROFILER_BRANCH(tmp); - return b < a.exact(); -} - -template -bool -operator==(const Lazy_exact_nt& a, int b) -{ - CGAL_BRANCH_PROFILER(std::string(" failures/calls to : ") + std::string(CGAL_PRETTY_FUNCTION), tmp); - Uncertain res = b == a.approx(); - if (is_certain(res)) - return get_certain(res); - CGAL_BRANCH_PROFILER_BRANCH(tmp); - return b == a.exact(); -} - - -// Mixed operators with double. -template -bool -operator<(const Lazy_exact_nt& a, double b) -{ - CGAL_BRANCH_PROFILER(std::string(" failures/calls to : ") + std::string(CGAL_PRETTY_FUNCTION), tmp); - Uncertain res = a.approx() < b; - if (is_certain(res)) - return res; - CGAL_BRANCH_PROFILER_BRANCH(tmp); - return a.exact() < b; -} - -template -bool -operator>(const Lazy_exact_nt& a, double b) -{ - CGAL_BRANCH_PROFILER(std::string(" failures/calls to : ") + std::string(CGAL_PRETTY_FUNCTION), tmp); - Uncertain res = b < a.approx(); - if (is_certain(res)) - return res; - CGAL_BRANCH_PROFILER_BRANCH(tmp); - return b < a.exact(); -} - -template -bool -operator==(const Lazy_exact_nt& a, double b) -{ - CGAL_BRANCH_PROFILER(std::string(" failures/calls to : ") + std::string(CGAL_PRETTY_FUNCTION), tmp); - Uncertain res = b == a.approx(); - if (is_certain(res)) - return res; - CGAL_BRANCH_PROFILER_BRANCH(tmp); - return b == a.exact(); -} - - - template Lazy_exact_nt< typename Coercion_traits::Type > operator+(const Lazy_exact_nt& a, const Lazy_exact_nt& b) From 84d2f1de5dbd1a8858e5b9a03116e4a6d702ce96 Mon Sep 17 00:00:00 2001 From: Marc Glisse Date: Sat, 11 Apr 2020 12:26:55 +0200 Subject: [PATCH 03/17] Remove wrong noexcept I copy-pasted them a bit too fast... --- Number_types/include/CGAL/GMP/Gmpq_type.h | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/Number_types/include/CGAL/GMP/Gmpq_type.h b/Number_types/include/CGAL/GMP/Gmpq_type.h index 156e24c02ba..634d5adfc2b 100644 --- a/Number_types/include/CGAL/GMP/Gmpq_type.h +++ b/Number_types/include/CGAL/GMP/Gmpq_type.h @@ -238,9 +238,9 @@ public: bool operator==(const Gmpq &q) const noexcept { return mpq_equal(this->mpq(), q.mpq()) != 0;} #if __cpp_impl_three_way_comparison >= 201907L - std::strong_ordering operator<=>(const Gmpq&q) const noexcept { return mpq_cmp(this->mpq(), q.mpq()) <=> 0; } + std::strong_ordering operator<=>(const Gmpq&q) const { return mpq_cmp(this->mpq(), q.mpq()) <=> 0; } #else - bool operator< (const Gmpq &q) const noexcept { return mpq_cmp(this->mpq(), q.mpq()) < 0; } + bool operator< (const Gmpq &q) const { return mpq_cmp(this->mpq(), q.mpq()) < 0; } #endif double to_double() const noexcept; @@ -264,7 +264,7 @@ public: Gmpq& operator*=(int z){return (*this)*= Gmpq(z);} Gmpq& operator/=(int z){return (*this)/= Gmpq(z);} #if __cpp_impl_three_way_comparison >= 201907L - std::strong_ordering operator<=>(int z) const noexcept { return mpq_cmp_si(mpq(),z,1) <=> 0; } + std::strong_ordering operator<=>(int z) const { return mpq_cmp_si(mpq(),z,1) <=> 0; } #else bool operator==(int z) const {return mpq_cmp_si(mpq(),z,1)==0;} bool operator< (int z) const {return mpq_cmp_si(mpq(),z,1)<0;} @@ -277,7 +277,7 @@ public: Gmpq& operator*=(long z){return (*this)*= Gmpq(z);} Gmpq& operator/=(long z){return (*this)/= Gmpq(z);} #if __cpp_impl_three_way_comparison >= 201907L - std::strong_ordering operator<=>(long z) const noexcept { return mpq_cmp_si(mpq(),z,1) <=> 0; } + std::strong_ordering operator<=>(long z) const { return mpq_cmp_si(mpq(),z,1) <=> 0; } #else bool operator==(long z) const {return mpq_cmp_si(mpq(),z,1)==0;} bool operator< (long z) const {return mpq_cmp_si(mpq(),z,1)<0;} @@ -290,7 +290,7 @@ public: Gmpq& operator*=(long long z){return (*this)*= Gmpq(z);} Gmpq& operator/=(long long z){return (*this)/= Gmpq(z);} #if __cpp_impl_three_way_comparison >= 201907L - std::strong_ordering operator<=>(long long z) const noexcept { return *this <=> Gmpq(z); } + std::strong_ordering operator<=>(long long z) const { return *this <=> Gmpq(z); } #else bool operator==(long long z) const {return (*this)== Gmpq(z);} bool operator< (long long z) const {return (*this)< Gmpq(z);} @@ -303,7 +303,7 @@ public: Gmpq& operator*=(double d){return (*this)*= Gmpq(d);} Gmpq& operator/=(double d){return (*this)/= Gmpq(d);} #if __cpp_impl_three_way_comparison >= 201907L - std::strong_ordering operator<=>(double d) const noexcept { return *this <=> Gmpq(d); } + std::strong_ordering operator<=>(double d) const { return *this <=> Gmpq(d); } #else bool operator==(double d) const {return (*this)== Gmpq(d);} bool operator< (double d) const {return (*this)< Gmpq(d);} @@ -316,7 +316,7 @@ public: Gmpq& operator*=(const Gmpz&); Gmpq& operator/=(const Gmpz&); #if __cpp_impl_three_way_comparison >= 201907L - std::strong_ordering operator<=>(const Gmpz& z) const noexcept { return *this <=> Gmpq(z); } + std::strong_ordering operator<=>(const Gmpz& z) const { return *this <=> Gmpq(z); } #else bool operator==(const Gmpz &z) const {return (*this)== Gmpq(z);} bool operator< (const Gmpz &z) const {return (*this)< Gmpq(z);} @@ -329,7 +329,7 @@ public: Gmpq& operator*=(const Gmpfr &f){return (*this)*= Gmpq(f);} Gmpq& operator/=(const Gmpfr &f){return (*this)/= Gmpq(f);} #if __cpp_impl_three_way_comparison >= 201907L - std::strong_ordering operator<=>(const Gmpfr& f) const noexcept { return 0 <=> mpfr_cmp_q(f.fr(),mpq()); } + std::strong_ordering operator<=>(const Gmpfr& f) const { return 0 <=> mpfr_cmp_q(f.fr(),mpq()); } #else bool operator==(const Gmpfr &f) const {return mpfr_cmp_q(f.fr(),mpq())==0;} bool operator< (const Gmpfr &f) const {return mpfr_cmp_q(f.fr(),mpq())>0;} From 8b79068a12fc784807599b1790cbcf9104428a96 Mon Sep 17 00:00:00 2001 From: Marc Glisse Date: Sat, 11 Apr 2020 13:19:06 +0200 Subject: [PATCH 04/17] friend operator== for Quotient --- Number_types/include/CGAL/Quotient.h | 34 ++++++++-------------------- 1 file changed, 9 insertions(+), 25 deletions(-) diff --git a/Number_types/include/CGAL/Quotient.h b/Number_types/include/CGAL/Quotient.h index 5c91f07d2cf..41e9423d9b7 100644 --- a/Number_types/include/CGAL/Quotient.h +++ b/Number_types/include/CGAL/Quotient.h @@ -129,6 +129,15 @@ class Quotient Quotient& operator*= (const CGAL_double(NT)& r); Quotient& operator/= (const CGAL_double(NT)& r); + friend bool operator==(const Quotient& x, const Quotient& y) + { return x.num * y.den == x.den * y.num; } + friend bool operator==(const Quotient& x, const NT& y) + { return x.den * y == x.num; } + friend inline bool operator==(const Quotient& x, const CGAL_int(NT) & y) + { return x.den * y == x.num; } + friend inline bool operator==(const Quotient& x, const CGAL_double(NT) & y) + { return x.den * y == x.num; } // Uh? + Quotient& normalize(); const NT& numerator() const { return num; } @@ -438,31 +447,6 @@ quotient_truncation(const Quotient& r) -template -CGAL_MEDIUM_INLINE -bool -operator==(const Quotient& x, const Quotient& y) -{ return x.num * y.den == x.den * y.num; } - -template -CGAL_MEDIUM_INLINE -bool -operator==(const Quotient& x, const NT& y) -{ return x.den * y == x.num; } - -template -inline -bool -operator==(const Quotient& x, const CGAL_int(NT) & y) -{ return x.den * y == x.num; } - -template -inline -bool -operator==(const Quotient& x, const CGAL_double(NT) & y) -{ return x.den * y == x.num; } - - template CGAL_MEDIUM_INLINE From a7ccc80f18d7aa239bb17ab2490aba25453fd409 Mon Sep 17 00:00:00 2001 From: Marc Glisse Date: Sun, 17 May 2020 11:42:10 +0200 Subject: [PATCH 05/17] comparisons for MP_Float --- Number_types/include/CGAL/MP_Float.h | 47 +++++++++++++--------------- 1 file changed, 22 insertions(+), 25 deletions(-) diff --git a/Number_types/include/CGAL/MP_Float.h b/Number_types/include/CGAL/MP_Float.h index 56e22b7e39b..b0a161837c1 100644 --- a/Number_types/include/CGAL/MP_Float.h +++ b/Number_types/include/CGAL/MP_Float.h @@ -27,6 +27,7 @@ #include #include #include +#include // MP_Float : multiprecision scaled integers. @@ -106,7 +107,13 @@ MP_Float operator*(const MP_Float &a, const MP_Float &b); MP_Float operator%(const MP_Float &a, const MP_Float &b); -class MP_Float +class MP_Float : boost::totally_ordered1 > +#endif + > { public: typedef short limb; @@ -223,6 +230,20 @@ public: MP_Float& operator*=(const MP_Float &a) { return *this = *this * a; } MP_Float& operator%=(const MP_Float &a) { return *this = *this % a; } + friend bool operator<(const MP_Float &a, const MP_Float &b) + { return INTERN_MP_FLOAT::compare(a, b) == SMALLER; } + + friend bool operator==(const MP_Float &a, const MP_Float &b) + { return (a.v == b.v) && (a.v.empty() || (a.exp == b.exp)); } + +#ifdef _MSC_VER + // Needed because without /permissive-, it makes hidden friends visible (operator== from Quotient) + friend bool operator==(const MP_Float &a, int b) + { return a == MP_Float(b); } + friend bool operator==(const MP_Float &a, double b) + { return a == MP_Float(b); } +#endif + exponent_type max_exp() const { return exponent_type(v.size()) + exp; @@ -365,30 +386,6 @@ inline void swap(MP_Float &m, MP_Float &n) { m.swap(n); } -inline -bool operator<(const MP_Float &a, const MP_Float &b) -{ return INTERN_MP_FLOAT::compare(a, b) == SMALLER; } - -inline -bool operator>(const MP_Float &a, const MP_Float &b) -{ return b < a; } - -inline -bool operator>=(const MP_Float &a, const MP_Float &b) -{ return ! (a < b); } - -inline -bool operator<=(const MP_Float &a, const MP_Float &b) -{ return ! (a > b); } - -inline -bool operator==(const MP_Float &a, const MP_Float &b) -{ return (a.v == b.v) && (a.v.empty() || (a.exp == b.exp)); } - -inline -bool operator!=(const MP_Float &a, const MP_Float &b) -{ return ! (a == b); } - MP_Float approximate_sqrt(const MP_Float &d); From 12c7bb2abdabec9b6c56f0c2fb18a5a0e249d4b2 Mon Sep 17 00:00:00 2001 From: Marc Glisse Date: Tue, 19 May 2020 11:24:12 +0200 Subject: [PATCH 06/17] More mixed MP_Float operations for visual studio --- Number_types/include/CGAL/MP_Float.h | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/Number_types/include/CGAL/MP_Float.h b/Number_types/include/CGAL/MP_Float.h index b0a161837c1..68cfdecde44 100644 --- a/Number_types/include/CGAL/MP_Float.h +++ b/Number_types/include/CGAL/MP_Float.h @@ -109,8 +109,8 @@ MP_Float operator%(const MP_Float &a, const MP_Float &b); class MP_Float : boost::totally_ordered1 > #endif > @@ -237,11 +237,13 @@ public: { return (a.v == b.v) && (a.v.empty() || (a.exp == b.exp)); } #ifdef _MSC_VER - // Needed because without /permissive-, it makes hidden friends visible (operator== from Quotient) - friend bool operator==(const MP_Float &a, int b) - { return a == MP_Float(b); } - friend bool operator==(const MP_Float &a, double b) - { return a == MP_Float(b); } + // Needed because without /permissive-, it makes hidden friends visible (from Quotient) + friend bool operator==(const MP_Float &a, int b) { return a == MP_Float(b); } + friend bool operator==(const MP_Float &a, double b) { return a == MP_Float(b); } + friend bool operator< (const MP_Float &a, int b) { return a < MP_Float(b); } + friend bool operator< (const MP_Float &a, double b) { return a < MP_Float(b); } + friend bool operator> (const MP_Float &a, int b) { return a > MP_Float(b); } + friend bool operator> (const MP_Float &a, double b) { return a > MP_Float(b); } #endif exponent_type max_exp() const From ad758d0e6efd2d2d43d725d141d7f6c26ffb9926 Mon Sep 17 00:00:00 2001 From: Marc Glisse Date: Wed, 20 May 2020 11:59:03 +0200 Subject: [PATCH 07/17] Revert spaceship on Gmpq it causes trouble with other classes, and not just for visual studio --- Number_types/include/CGAL/GMP/Gmpq_type.h | 46 +---------------------- 1 file changed, 2 insertions(+), 44 deletions(-) diff --git a/Number_types/include/CGAL/GMP/Gmpq_type.h b/Number_types/include/CGAL/GMP/Gmpq_type.h index 634d5adfc2b..451d2b00cdd 100644 --- a/Number_types/include/CGAL/GMP/Gmpq_type.h +++ b/Number_types/include/CGAL/GMP/Gmpq_type.h @@ -35,10 +35,6 @@ #include #include -#if __cpp_impl_three_way_comparison >= 201907L -# include -#endif - #if defined(BOOST_MSVC) # pragma warning(push) # pragma warning(disable:4146) @@ -65,17 +61,8 @@ private: class Gmpq - : Handle_for -#if __cpp_impl_three_way_comparison >= 201907L - , boost::field_operators2< Gmpq, int - , boost::field_operators2< Gmpq, long - , boost::field_operators2< Gmpq, long long - , boost::field_operators2< Gmpq, double - , boost::field_operators2< Gmpq, Gmpz - , boost::field_operators2< Gmpq, Gmpfr - > > > > > > -#else - , boost::totally_ordered1< Gmpq + : Handle_for, + boost::totally_ordered1< Gmpq , boost::ordered_field_operators2< Gmpq, int , boost::ordered_field_operators2< Gmpq, long , boost::ordered_field_operators2< Gmpq, long long @@ -83,7 +70,6 @@ class Gmpq , boost::ordered_field_operators2< Gmpq, Gmpz , boost::ordered_field_operators2< Gmpq, Gmpfr > > > > > > > -#endif { typedef Handle_for Base; public: @@ -237,11 +223,7 @@ public: Gmpq& operator/=(const Gmpq &q); bool operator==(const Gmpq &q) const noexcept { return mpq_equal(this->mpq(), q.mpq()) != 0;} -#if __cpp_impl_three_way_comparison >= 201907L - std::strong_ordering operator<=>(const Gmpq&q) const { return mpq_cmp(this->mpq(), q.mpq()) <=> 0; } -#else bool operator< (const Gmpq &q) const { return mpq_cmp(this->mpq(), q.mpq()) < 0; } -#endif double to_double() const noexcept; Sign sign() const noexcept; @@ -263,78 +245,54 @@ public: Gmpq& operator-=(int z){return (*this)-= Gmpq(z);} Gmpq& operator*=(int z){return (*this)*= Gmpq(z);} Gmpq& operator/=(int z){return (*this)/= Gmpq(z);} -#if __cpp_impl_three_way_comparison >= 201907L - std::strong_ordering operator<=>(int z) const { return mpq_cmp_si(mpq(),z,1) <=> 0; } -#else bool operator==(int z) const {return mpq_cmp_si(mpq(),z,1)==0;} bool operator< (int z) const {return mpq_cmp_si(mpq(),z,1)<0;} bool operator> (int z) const {return mpq_cmp_si(mpq(),z,1)>0;} -#endif // Interoperability with long Gmpq& operator+=(long z){return (*this)+= Gmpq(z);} Gmpq& operator-=(long z){return (*this)-= Gmpq(z);} Gmpq& operator*=(long z){return (*this)*= Gmpq(z);} Gmpq& operator/=(long z){return (*this)/= Gmpq(z);} -#if __cpp_impl_three_way_comparison >= 201907L - std::strong_ordering operator<=>(long z) const { return mpq_cmp_si(mpq(),z,1) <=> 0; } -#else bool operator==(long z) const {return mpq_cmp_si(mpq(),z,1)==0;} bool operator< (long z) const {return mpq_cmp_si(mpq(),z,1)<0;} bool operator> (long z) const {return mpq_cmp_si(mpq(),z,1)>0;} -#endif // Interoperability with long long Gmpq& operator+=(long long z){return (*this)+= Gmpq(z);} Gmpq& operator-=(long long z){return (*this)-= Gmpq(z);} Gmpq& operator*=(long long z){return (*this)*= Gmpq(z);} Gmpq& operator/=(long long z){return (*this)/= Gmpq(z);} -#if __cpp_impl_three_way_comparison >= 201907L - std::strong_ordering operator<=>(long long z) const { return *this <=> Gmpq(z); } -#else bool operator==(long long z) const {return (*this)== Gmpq(z);} bool operator< (long long z) const {return (*this)< Gmpq(z);} bool operator> (long long z) const {return (*this)> Gmpq(z);} -#endif // Interoperability with double Gmpq& operator+=(double d){return (*this)+= Gmpq(d);} Gmpq& operator-=(double d){return (*this)-= Gmpq(d);} Gmpq& operator*=(double d){return (*this)*= Gmpq(d);} Gmpq& operator/=(double d){return (*this)/= Gmpq(d);} -#if __cpp_impl_three_way_comparison >= 201907L - std::strong_ordering operator<=>(double d) const { return *this <=> Gmpq(d); } -#else bool operator==(double d) const {return (*this)== Gmpq(d);} bool operator< (double d) const {return (*this)< Gmpq(d);} bool operator> (double d) const {return (*this)> Gmpq(d);} -#endif // Interoperability with Gmpz Gmpq& operator+=(const Gmpz&); Gmpq& operator-=(const Gmpz&); Gmpq& operator*=(const Gmpz&); Gmpq& operator/=(const Gmpz&); -#if __cpp_impl_three_way_comparison >= 201907L - std::strong_ordering operator<=>(const Gmpz& z) const { return *this <=> Gmpq(z); } -#else bool operator==(const Gmpz &z) const {return (*this)== Gmpq(z);} bool operator< (const Gmpz &z) const {return (*this)< Gmpq(z);} bool operator> (const Gmpz &z) const {return (*this)> Gmpq(z);} -#endif // Interoperability with Gmpfr Gmpq& operator+=(const Gmpfr &f){return (*this)+= Gmpq(f);} Gmpq& operator-=(const Gmpfr &f){return (*this)-= Gmpq(f);} Gmpq& operator*=(const Gmpfr &f){return (*this)*= Gmpq(f);} Gmpq& operator/=(const Gmpfr &f){return (*this)/= Gmpq(f);} -#if __cpp_impl_three_way_comparison >= 201907L - std::strong_ordering operator<=>(const Gmpfr& f) const { return 0 <=> mpfr_cmp_q(f.fr(),mpq()); } -#else bool operator==(const Gmpfr &f) const {return mpfr_cmp_q(f.fr(),mpq())==0;} bool operator< (const Gmpfr &f) const {return mpfr_cmp_q(f.fr(),mpq())>0;} bool operator> (const Gmpfr &f) const {return mpfr_cmp_q(f.fr(),mpq())<0;} -#endif }; From 314e4312fee14bd1a695898882fe24d906049f0a Mon Sep 17 00:00:00 2001 From: Marc Glisse Date: Wed, 20 May 2020 16:21:36 +0200 Subject: [PATCH 08/17] Polynomial: C++20 vs boost operators --- Polynomial/include/CGAL/Polynomial/Polynomial_type.h | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Polynomial/include/CGAL/Polynomial/Polynomial_type.h b/Polynomial/include/CGAL/Polynomial/Polynomial_type.h index b30cf524458..05d2bce319c 100644 --- a/Polynomial/include/CGAL/Polynomial/Polynomial_type.h +++ b/Polynomial/include/CGAL/Polynomial/Polynomial_type.h @@ -190,9 +190,18 @@ template class Polynomial : public Handle_with_policy< internal::Polynomial_rep >, public boost::ordered_field_operators1< Polynomial , +#if __cpp_impl_three_way_comparison >= 201907L + boost::less_than_comparable2< Polynomial , NT_ , + boost::less_than_comparable2< Polynomial , CGAL_icoeff(NT_), + boost::less_than_comparable2< Polynomial , CGAL_int(NT_), + boost::field_operators2< Polynomial , NT_ , + boost::field_operators2< Polynomial , CGAL_icoeff(NT_), + boost::field_operators2< Polynomial , CGAL_int(NT_) > > > > > > > +#else boost::ordered_field_operators2< Polynomial , NT_ , boost::ordered_field_operators2< Polynomial , CGAL_icoeff(NT_), boost::ordered_field_operators2< Polynomial , CGAL_int(NT_) > > > > +#endif { typedef typename internal::Innermost_coefficient_type::Type Innermost_coefficient_type; public: From 9d218a45e0b339819875b69f9de3c927566ea1f6 Mon Sep 17 00:00:00 2001 From: Marc Glisse Date: Thu, 21 May 2020 11:42:35 +0200 Subject: [PATCH 09/17] use rebind_alloc in Union_find --- Union_find/include/CGAL/Union_find.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Union_find/include/CGAL/Union_find.h b/Union_find/include/CGAL/Union_find.h index a76cf515856..88edb3e206b 100644 --- a/Union_find/include/CGAL/Union_find.h +++ b/Union_find/include/CGAL/Union_find.h @@ -114,8 +114,7 @@ public: #ifdef _MSC_VER typedef CGAL_ALLOCATOR(Union_find_struct) allocator; #else - typedef typename A::template rebind Rebind; - typedef typename Rebind::other allocator; + typedef typename std::allocator_traits::rebind_alloc allocator; #endif private: From f3d5a573dff4ad78b17d1ebf0f708e6f7ca68ce5 Mon Sep 17 00:00:00 2001 From: Marc Glisse Date: Thu, 21 May 2020 11:52:21 +0200 Subject: [PATCH 10/17] Use allocator_traits for destroy --- STL_Extension/include/CGAL/Concurrent_compact_container.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/STL_Extension/include/CGAL/Concurrent_compact_container.h b/STL_Extension/include/CGAL/Concurrent_compact_container.h index 5ab9eca6790..2cf395fdba6 100644 --- a/STL_Extension/include/CGAL/Concurrent_compact_container.h +++ b/STL_Extension/include/CGAL/Concurrent_compact_container.h @@ -718,7 +718,7 @@ void Concurrent_compact_container::clear() size_type s = it->second; for (pointer pp = p + 1; pp != p + s - 1; ++pp) { if (type(pp) == USED) - m_alloc.destroy(pp); + std::allocator_traits::destroy(m_alloc, pp); } m_alloc.deallocate(p, s); } From fcd4e578231eae61d7df5e8382891c612d48c9a3 Mon Sep 17 00:00:00 2001 From: Marc Glisse Date: Fri, 22 May 2020 11:29:03 +0200 Subject: [PATCH 11/17] Missing 'template' --- Union_find/include/CGAL/Union_find.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Union_find/include/CGAL/Union_find.h b/Union_find/include/CGAL/Union_find.h index 88edb3e206b..16dc14bdb74 100644 --- a/Union_find/include/CGAL/Union_find.h +++ b/Union_find/include/CGAL/Union_find.h @@ -114,7 +114,7 @@ public: #ifdef _MSC_VER typedef CGAL_ALLOCATOR(Union_find_struct) allocator; #else - typedef typename std::allocator_traits::rebind_alloc allocator; + typedef typename std::allocator_traits::template rebind_alloc allocator; #endif private: From 257a92d60cb61a295819f3585bde340905da6dd6 Mon Sep 17 00:00:00 2001 From: Marc Glisse Date: Fri, 22 May 2020 12:22:53 +0200 Subject: [PATCH 12/17] friend comparisons for Polynomial That's less likely to break if the C++20 rules get reverted This class is strange, it uses boost operators, but still provides some operators that boost already provides (and the boost ones have priority). --- .../include/CGAL/Polynomial/Polynomial_type.h | 151 ++++++------------ 1 file changed, 46 insertions(+), 105 deletions(-) diff --git a/Polynomial/include/CGAL/Polynomial/Polynomial_type.h b/Polynomial/include/CGAL/Polynomial/Polynomial_type.h index 05d2bce319c..540f17bd203 100644 --- a/Polynomial/include/CGAL/Polynomial/Polynomial_type.h +++ b/Polynomial/include/CGAL/Polynomial/Polynomial_type.h @@ -190,18 +190,9 @@ template class Polynomial : public Handle_with_policy< internal::Polynomial_rep >, public boost::ordered_field_operators1< Polynomial , -#if __cpp_impl_three_way_comparison >= 201907L - boost::less_than_comparable2< Polynomial , NT_ , - boost::less_than_comparable2< Polynomial , CGAL_icoeff(NT_), - boost::less_than_comparable2< Polynomial , CGAL_int(NT_), - boost::field_operators2< Polynomial , NT_ , - boost::field_operators2< Polynomial , CGAL_icoeff(NT_), - boost::field_operators2< Polynomial , CGAL_int(NT_) > > > > > > > -#else boost::ordered_field_operators2< Polynomial , NT_ , boost::ordered_field_operators2< Polynomial , CGAL_icoeff(NT_), boost::ordered_field_operators2< Polynomial , CGAL_int(NT_) > > > > -#endif { typedef typename internal::Innermost_coefficient_type::Type Innermost_coefficient_type; public: @@ -966,6 +957,52 @@ public: } friend Polynomial operator - <> (const Polynomial&); + + // + // Comparison Operators + // + + // polynomials only + friend bool operator == (const Polynomial& p1, const Polynomial& p2) { + CGAL_precondition(p1.degree() >= 0); + CGAL_precondition(p2.degree() >= 0); + if (p1.is_identical(p2)) return true; + if (p1.degree() != p2.degree()) return false; + for (int i = p1.degree(); i >= 0; i--) if (p1[i] != p2[i]) return false; + return true; + } + friend bool operator < (const Polynomial& p1, const Polynomial& p2) + { return ( p1.compare(p2) < 0 ); } + + // operators NT + friend bool operator == (const Polynomial& p, const NT& num) { + CGAL_precondition(p.degree() >= 0); + return p.degree() == 0 && p[0] == num; + } + friend bool operator < (const Polynomial& p,const NT& num) + { return ( p.compare(num) < 0 );} + friend bool operator > (const Polynomial& p,const NT& num) + { return ( p.compare(num) > 0 );} + + // compare int ################################# + friend bool operator == (const Polynomial& p, const CGAL_int(NT)& num) { + CGAL_precondition(p.degree() >= 0); + return p.degree() == 0 && p[0] == NT(num); + } + friend bool operator < (const Polynomial& p, const CGAL_int(NT)& num) + { return ( p.compare(NT(num)) < 0 );} + friend bool operator > (const Polynomial& p, const CGAL_int(NT)& num) + { return ( p.compare(NT(num)) > 0 );} + + // compare icoeff ################################### + friend bool operator == (const Polynomial& p, const CGAL_icoeff(NT)& num) { + CGAL_precondition(p.degree() >= 0); + return p.degree() == 0 && p[0] == NT(num); + } + friend bool operator < (const Polynomial& p, const CGAL_icoeff(NT)& num) + { return ( p.compare(NT(num)) < 0 );} + friend bool operator > (const Polynomial& p, const CGAL_icoeff(NT)& num) + { return ( p.compare(NT(num)) > 0 );} }; // class Polynomial // Arithmetic Operators, Part III: @@ -1008,102 +1045,6 @@ Polynomial operator * (const Polynomial& p1, } -// -// Comparison Operators -// - -// polynomials only -template inline -bool operator == (const Polynomial& p1, const Polynomial& p2) { - CGAL_precondition(p1.degree() >= 0); - CGAL_precondition(p2.degree() >= 0); - if (p1.is_identical(p2)) return true; - if (p1.degree() != p2.degree()) return false; - for (int i = p1.degree(); i >= 0; i--) if (p1[i] != p2[i]) return false; - return true; -} -template inline -bool operator < (const Polynomial& p1, const Polynomial& p2) -{ return ( p1.compare(p2) < 0 ); } -template inline -bool operator > (const Polynomial& p1, const Polynomial& p2) -{ return ( p1.compare(p2) > 0 ); } - -// operators NT -template inline -bool operator == (const NT& num, const Polynomial& p) { - CGAL_precondition(p.degree() >= 0); - return p.degree() == 0 && p[0] == num; -} -template inline -bool operator == (const Polynomial& p, const NT& num) { - CGAL_precondition(p.degree() >= 0); - return p.degree() == 0 && p[0] == num; -} -template inline -bool operator < (const NT& num, const Polynomial& p) -{ return ( p.compare(num) > 0 );} -template inline -bool operator < (const Polynomial& p,const NT& num) -{ return ( p.compare(num) < 0 );} -template inline -bool operator > (const NT& num, const Polynomial& p) -{ return ( p.compare(num) < 0 );} -template inline -bool operator > (const Polynomial& p,const NT& num) -{ return ( p.compare(num) > 0 );} - - -// compare int ################################# -template inline -bool operator == (const CGAL_int(NT)& num, const Polynomial& p) { - CGAL_precondition(p.degree() >= 0); - return p.degree() == 0 && p[0] == NT(num); -} -template inline -bool operator == (const Polynomial& p, const CGAL_int(NT)& num) { - CGAL_precondition(p.degree() >= 0); - return p.degree() == 0 && p[0] == NT(num); -} -template inline -bool operator < (const CGAL_int(NT)& num, const Polynomial& p) -{ return ( p.compare(NT(num)) > 0 );} -template inline -bool operator < (const Polynomial& p, const CGAL_int(NT)& num) -{ return ( p.compare(NT(num)) < 0 );} -template inline -bool operator > (const CGAL_int(NT)& num, const Polynomial& p) -{ return ( p.compare(NT(num)) < 0 );} -template inline -bool operator > (const Polynomial& p, const CGAL_int(NT)& num) -{ return ( p.compare(NT(num)) > 0 );} - -// compare icoeff ################################### -template inline -bool operator == (const CGAL_icoeff(NT)& num, const Polynomial& p) { - CGAL_precondition(p.degree() >= 0); - return p.degree() == 0 && p[0] == NT(num); -} -template inline -bool operator == (const Polynomial& p, const CGAL_icoeff(NT)& num) { - CGAL_precondition(p.degree() >= 0); - return p.degree() == 0 && p[0] == NT(num); -} -template inline -bool operator < (const CGAL_icoeff(NT)& num, const Polynomial& p) -{ return ( p.compare(NT(num)) > 0 );} -template inline -bool operator < (const Polynomial& p, const CGAL_icoeff(NT)& num) -{ return ( p.compare(NT(num)) < 0 );} - - -template inline -bool operator > (const CGAL_icoeff(NT)& num, const Polynomial& p) -{ return ( p.compare(NT(num)) < 0 );} -template inline -bool operator > (const Polynomial& p, const CGAL_icoeff(NT)& num) -{ return ( p.compare(NT(num)) > 0 );} - // // Algebraically non-trivial operations // From 7a35fbe6fb9d7baeed51671901dfdc3bdcb30264 Mon Sep 17 00:00:00 2001 From: Marc Glisse Date: Fri, 22 May 2020 12:28:46 +0200 Subject: [PATCH 13/17] Drop useless template parameter --- Number_types/include/CGAL/Quotient.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Number_types/include/CGAL/Quotient.h b/Number_types/include/CGAL/Quotient.h index 41e9423d9b7..56c17c1515f 100644 --- a/Number_types/include/CGAL/Quotient.h +++ b/Number_types/include/CGAL/Quotient.h @@ -129,13 +129,13 @@ class Quotient Quotient& operator*= (const CGAL_double(NT)& r); Quotient& operator/= (const CGAL_double(NT)& r); - friend bool operator==(const Quotient& x, const Quotient& y) + friend bool operator==(const Quotient& x, const Quotient& y) { return x.num * y.den == x.den * y.num; } - friend bool operator==(const Quotient& x, const NT& y) + friend bool operator==(const Quotient& x, const NT& y) { return x.den * y == x.num; } - friend inline bool operator==(const Quotient& x, const CGAL_int(NT) & y) + friend inline bool operator==(const Quotient& x, const CGAL_int(NT) & y) { return x.den * y == x.num; } - friend inline bool operator==(const Quotient& x, const CGAL_double(NT) & y) + friend inline bool operator==(const Quotient& x, const CGAL_double(NT) & y) { return x.den * y == x.num; } // Uh? Quotient& normalize(); From d7224e5f66e45d3d6d4fc21806e4399478fa1196 Mon Sep 17 00:00:00 2001 From: Marc Glisse Date: Sun, 24 May 2020 11:08:44 +0200 Subject: [PATCH 14/17] Weirdo constructor --- Interpolation/include/CGAL/interpolation_functions.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Interpolation/include/CGAL/interpolation_functions.h b/Interpolation/include/CGAL/interpolation_functions.h index 58780776458..0c672580504 100644 --- a/Interpolation/include/CGAL/interpolation_functions.h +++ b/Interpolation/include/CGAL/interpolation_functions.h @@ -34,7 +34,7 @@ struct Data_access typedef typename Map::mapped_type Data_type; typedef typename Map::key_type Key_type; - Data_access(const Map& m): map(m){} + Data_access(const Map& m): map(m){} std::pair< Data_type, bool> operator()(const Key_type& p) const From 2756b2ac35efdb96cb1874ee01aa468e3e742201 Mon Sep 17 00:00:00 2001 From: Marc Glisse Date: Sun, 24 May 2020 11:11:32 +0200 Subject: [PATCH 15/17] More weirdo constructors --- .../CGAL/Boolean_set_operations_2/Polygon_2_curve_iterator.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Boolean_set_operations_2/include/CGAL/Boolean_set_operations_2/Polygon_2_curve_iterator.h b/Boolean_set_operations_2/include/CGAL/Boolean_set_operations_2/Polygon_2_curve_iterator.h index 39a5e7dd34a..833f9afd571 100644 --- a/Boolean_set_operations_2/include/CGAL/Boolean_set_operations_2/Polygon_2_curve_iterator.h +++ b/Boolean_set_operations_2/include/CGAL/Boolean_set_operations_2/Polygon_2_curve_iterator.h @@ -60,9 +60,9 @@ public: Edge_const_iterator m_curr_edge; // points to the current edge iterator public: - Polygon_2_curve_iterator< X_monotone_curve_2_, Polygon_ >(){} + Polygon_2_curve_iterator(){} - Polygon_2_curve_iterator< X_monotone_curve_2_, Polygon_ > + Polygon_2_curve_iterator (const Polygon* pgn, Edge_const_iterator ci) : m_pgn(pgn), m_curr_edge(ci) {} From 0fcbaf5aa4e55352f9d0766b12e66036f1d49432 Mon Sep 17 00:00:00 2001 From: Marc Glisse Date: Sun, 24 May 2020 11:15:12 +0200 Subject: [PATCH 16/17] More weirdo constructors --- .../include/CGAL/Largest_empty_iso_rectangle_2.h | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/Inscribed_areas/include/CGAL/Largest_empty_iso_rectangle_2.h b/Inscribed_areas/include/CGAL/Largest_empty_iso_rectangle_2.h index 601f4d3e9d6..382c80e2c0b 100644 --- a/Inscribed_areas/include/CGAL/Largest_empty_iso_rectangle_2.h +++ b/Inscribed_areas/include/CGAL/Largest_empty_iso_rectangle_2.h @@ -233,12 +233,11 @@ public: ~Largest_empty_iso_rectangle_2(); //! An operator= - Largest_empty_iso_rectangle_2& - operator =(const Largest_empty_iso_rectangle_2& ler); + Largest_empty_iso_rectangle_2& + operator =(const Largest_empty_iso_rectangle_2& ler); //! A copy constructor - Largest_empty_iso_rectangle_2( - const Largest_empty_iso_rectangle_2& ler); + Largest_empty_iso_rectangle_2(const Largest_empty_iso_rectangle_2& ler); struct Internal_point { Point_2 x_part;// the x coordinate of the point From e2a77e54b8ac1c9e86ab30819d2a16837237a3fb Mon Sep 17 00:00:00 2001 From: Marc Glisse Date: Sun, 24 May 2020 11:18:01 +0200 Subject: [PATCH 17/17] More weirdo constructors --- .../include/CGAL/Gps_circle_segment_traits_2.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Boolean_set_operations_2/include/CGAL/Gps_circle_segment_traits_2.h b/Boolean_set_operations_2/include/CGAL/Gps_circle_segment_traits_2.h index 1d29214e267..4b88536cf14 100644 --- a/Boolean_set_operations_2/include/CGAL/Gps_circle_segment_traits_2.h +++ b/Boolean_set_operations_2/include/CGAL/Gps_circle_segment_traits_2.h @@ -27,7 +27,7 @@ class Gps_circle_segment_traits_2 : public Gps_traits_2 > { public: - Gps_circle_segment_traits_2(bool use_cache = false) : + Gps_circle_segment_traits_2(bool use_cache = false) : Gps_traits_2 >() { this->m_use_cache = use_cache;