- qualify left_turn with CGAL:: to remove ambiguity when LEDA < 4.4 used

- remove obsolete config flag in rational_rotation related to std::swap
This commit is contained in:
Susan Hert 2002-11-05 14:07:58 +00:00
parent 9e9c83d035
commit 2279f5ff1a
5 changed files with 22 additions and 12 deletions

View File

@ -1,3 +1,7 @@
3.97 (5 November 2002)
- qualify left_turn with CGAL:: to remove ambiguity when LEDA < 4.4 used
- remove obsolete config flag in rational_rotation related to std::swap
3.96 (25 October 2002)
- Rewrite iterator traits pointer specs.

View File

@ -2624,6 +2624,12 @@ public:
{ return r.is_vertical(); }
};
// We qualify the call to the global function with the CGAL namespace because
// otherwise ambigiuties arise when Point_2 is a leda_point (or leda_rat_point)
// and using LEDA versions earlier than 4.4 (where the leda namespace was
// introduced). Compilers cannot decide between the left_turn from LEDA in
// global namespace and the left_turn in CGAL namespace defined in
// (rat_)leda_for_CGAL_2.h.
template <typename K>
class Left_turn_2
{
@ -2634,7 +2640,7 @@ public:
bool
operator()(const Point_2& p, const Point_2& q, const Point_2& r) const
{ return left_turn(p, q, r); }
{ return CGAL::left_turn(p, q, r); }
};
template <typename K>
@ -3009,7 +3015,7 @@ public:
bool
operator()(const Point_2& p, const Point_2& q, const Point_2& r) const
{ return left_turn(p, q, r); }
{ return CGAL::left_turn(p, q, r); }
};
template <typename K>

View File

@ -39,9 +39,6 @@ rational_rotation_approximation( const NT & dirx, // dir.x()
const NT & eps_num, // quality_bound
const NT & eps_den )
{
#ifndef CGAL_CFG_NO_NAMESPACE
using std::swap;
#endif // CGAL_CFG_NO_NAMESPACE
const NT& n = eps_num;
const NT& d = eps_den;
@ -63,7 +60,7 @@ rational_rotation_approximation( const NT & dirx, // dir.x()
if (dy > dx)
{
swap (dx,dy);
std::swap (dx,dy);
}
// approximate sin = dy / sqrt(sq_hypotenuse)
// if ( dy / sqrt(sq_hypotenuse) < n/d )

View File

@ -2624,6 +2624,12 @@ public:
{ return r.is_vertical(); }
};
// We qualify the call to the global function with the CGAL namespace because
// otherwise ambigiuties arise when Point_2 is a leda_point (or leda_rat_point)
// and using LEDA versions earlier than 4.4 (where the leda namespace was
// introduced). Compilers cannot decide between the left_turn from LEDA in
// global namespace and the left_turn in CGAL namespace defined in
// (rat_)leda_for_CGAL_2.h.
template <typename K>
class Left_turn_2
{
@ -2634,7 +2640,7 @@ public:
bool
operator()(const Point_2& p, const Point_2& q, const Point_2& r) const
{ return left_turn(p, q, r); }
{ return CGAL::left_turn(p, q, r); }
};
template <typename K>
@ -3009,7 +3015,7 @@ public:
bool
operator()(const Point_2& p, const Point_2& q, const Point_2& r) const
{ return left_turn(p, q, r); }
{ return CGAL::left_turn(p, q, r); }
};
template <typename K>

View File

@ -39,9 +39,6 @@ rational_rotation_approximation( const NT & dirx, // dir.x()
const NT & eps_num, // quality_bound
const NT & eps_den )
{
#ifndef CGAL_CFG_NO_NAMESPACE
using std::swap;
#endif // CGAL_CFG_NO_NAMESPACE
const NT& n = eps_num;
const NT& d = eps_den;
@ -63,7 +60,7 @@ rational_rotation_approximation( const NT & dirx, // dir.x()
if (dy > dx)
{
swap (dx,dy);
std::swap (dx,dy);
}
// approximate sin = dy / sqrt(sq_hypotenuse)
// if ( dy / sqrt(sq_hypotenuse) < n/d )