Remove dependency on CGAL/functional -> replace Unary_function

and Binary_function by std:: counterparts.
This commit is contained in:
Michael Hoffmann 2008-07-23 15:07:16 +00:00
parent 55a10f768a
commit a25985b73b
5 changed files with 21 additions and 17 deletions

View File

@ -21,7 +21,7 @@
#ifndef CGAL_INSTANTANEOUS_ADAPTOR_H
#define CGAL_INSTANTANEOUS_ADAPTOR_H
#include <CGAL/Kinetic/basic.h>
#include <CGAL/functional_base.h>
#include <functional>
CGAL_KINETIC_BEGIN_NAMESPACE;

View File

@ -646,7 +646,7 @@ class Real_embeddable_traits< CGAL::POLYNOMIAL::internal::Simple_interval_root<T
public:
typedef CGAL::POLYNOMIAL::internal::Simple_interval_root<T> Type;
class Abs
: public Unary_function< Type, Type > {
: public std::unary_function< Type, Type > {
public:
Type operator()( const Type& x ) const {
if (x < Type(0)) return -x;
@ -655,7 +655,7 @@ public:
};
class Sign
: public Unary_function< Type, ::CGAL::Sign > {
: public std::unary_function< Type, ::CGAL::Sign > {
public:
::CGAL::Sign operator()( const Type& x ) const {
return static_cast<CGAL::Sign>(x.compare(0));
@ -663,7 +663,7 @@ public:
};
class Compare
: public Binary_function< Type, Type,
: public std::binary_function< Type, Type,
Comparison_result > {
public:
Comparison_result operator()( const Type& x,
@ -677,7 +677,7 @@ public:
};
class To_double
: public Unary_function< Type, double > {
: public std::unary_function< Type, double > {
public:
double operator()( const Type& x ) const {
// this call is required to get reasonable values for the double
@ -687,7 +687,7 @@ public:
};
class To_interval
: public Unary_function< Type, std::pair< double, double > > {
: public std::unary_function< Type, std::pair< double, double > > {
public:
std::pair<double, double> operator()( const Type& x ) const {

View File

@ -952,7 +952,7 @@ class Real_embeddable_traits< CGAL::POLYNOMIAL::internal::Sturm_root_rep<T,I> >
public:
typedef CGAL::POLYNOMIAL::internal::Sturm_root_rep<T,I> Type;
class Abs
: public Unary_function< Type, Type > {
: public std::unary_function< Type, Type > {
public:
Type operator()( const Type& x ) const {
if (x < Type(0)) return -x;
@ -961,7 +961,7 @@ public:
};
class Sign
: public Unary_function< Type, ::CGAL::Sign > {
: public std::unary_function< Type, ::CGAL::Sign > {
public:
::CGAL::Sign operator()( const Type& x ) const {
return static_cast<CGAL::Sign>(x.compare(0));
@ -969,7 +969,7 @@ public:
};
class Compare
: public Binary_function< Type, Type,
: public std::binary_function< Type, Type,
Comparison_result > {
public:
Comparison_result operator()( const Type& x,
@ -983,7 +983,7 @@ public:
};
class To_double
: public Unary_function< Type, double > {
: public std::unary_function< Type, double > {
public:
double operator()( const Type& x ) const {
// this call is required to get reasonable values for the double
@ -993,7 +993,7 @@ public:
};
class To_interval
: public Unary_function< Type, std::pair< double, double > > {
: public std::unary_function< Type, std::pair< double, double > > {
public:
std::pair<double, double> operator()( const Type& x ) const {

View File

@ -224,7 +224,7 @@ template <class A, class B> \
#define CGAL_REAL_EMBEDDABLE_BODY \
class Abs \
: public Unary_function< Type, Type > { \
: public std::unary_function< Type, Type > { \
public: \
Type operator()( const Type& x ) const { \
if (x < Type(0)) return -x; \
@ -233,7 +233,7 @@ template <class A, class B> \
}; \
\
class Sign \
: public Unary_function< Type, ::CGAL::Sign > { \
: public std::unary_function< Type, ::CGAL::Sign > { \
public: \
::CGAL::Sign operator()( const Type& x ) const { \
return static_cast<CGAL::Sign>(x.compare(0)); \
@ -241,7 +241,7 @@ template <class A, class B> \
}; \
\
class Compare \
: public Binary_function< Type, Type, \
: public std::binary_function< Type, Type, \
Comparison_result > { \
public: \
Comparison_result operator()( const Type& x, \
@ -255,7 +255,7 @@ template <class A, class B> \
}; \
\
class To_double \
: public Unary_function< Type, double > { \
: public std::unary_function< Type, double > { \
public: \
double operator()( const Type& x ) const { \
return x.approximation(.00000001); \
@ -263,7 +263,7 @@ template <class A, class B> \
}; \
\
class To_interval \
: public Unary_function< Type, std::pair< double, double > > { \
: public std::unary_function< Type, std::pair< double, double > > { \
public: \
std::pair<double, double> operator()( const Type& x ) const { \
\

View File

@ -1,3 +1,7 @@
23 July 2008 Michael Hoffmann
- Remove dependency on CGAL/functional -> replace Unary_function
and Binary_function by std:: counterparts.
9 March 2006 Joachim Reichel
- LGPL copyright notice added to src/CGALQt/kds{,_deps}.makefile
@ -29,4 +33,4 @@ January 2007 Daniel Russel
- Traits classes are now dimension independent.
- Kinetic::Kinetic_kernel is now called Kinetic::Cartesian to be consistent with the
static one
- Added auditing for events through the Event::audit method and the Simulator::audit_event method. This means KDSs can check for extra events and for events which the simulator does not know about.
- Added auditing for events through the Event::audit method and the Simulator::audit_event method. This means KDSs can check for extra events and for events which the simulator does not know about.