diff --git a/Kernel_d/include/CGAL/Kernel_d/Iso_box_d.h b/Kernel_d/include/CGAL/Kernel_d/Iso_box_d.h index 2f150262095..3964fa2ada7 100644 --- a/Kernel_d/include/CGAL/Kernel_d/Iso_box_d.h +++ b/Kernel_d/include/CGAL/Kernel_d/Iso_box_d.h @@ -25,6 +25,7 @@ #include #include #include +#include namespace CGAL { @@ -32,29 +33,6 @@ namespace CGAL { struct Begin {}; struct End {}; struct Cartesian_end {}; - - template - struct equal_to { - typedef bool result_type; - - result_type operator()(const T &lhs, const T &rhs) const - { - return lhs == rhs; - } - - }; - - template - struct minus { - typedef T result_type; - - result_type operator()(const T &lhs, const T &rhs) const - { - return lhs - rhs; - } - - }; - } // namespace Kernel_d template < typename Point_, typename Functor_ > @@ -64,7 +42,13 @@ namespace CGAL { typedef typename Point::Cartesian_const_iterator Iterator; typedef Cartesian_iterator Self; - typedef typename Functor::result_type value_type; + + typedef typename std::iterator_traits::value_type + Coordinate_type; + + typedef decltype( + std::declval()(std::declval(), + std::declval())) value_type; typedef value_type& reference; typedef value_type* pointer; typedef std::ptrdiff_t difference_type; @@ -300,7 +284,7 @@ namespace CGAL { RT volume_nominator() const { - typedef typename CIRT::template Iterator >::type + typedef typename CIRT::template Iterator >::type Iter; Iter b(ptr()->upper, ptr()->lower, Begin()); Iter e(ptr()->upper, ptr()->lower, Cartesian_end()); @@ -396,7 +380,7 @@ public: bool is_degenerate() const { typedef typename CIRT:: - template Iterator >::type Iter; + template Iterator >::type Iter; // omit homogenizing coordinates Iter e(ptr()->lower, ptr()->upper, Cartesian_end()); return