mirror of https://github.com/CGAL/cgal
Simplify `value_type` and change `reference`
This commit is contained in:
parent
75bdca5e9f
commit
21cda32aef
|
|
@ -42,15 +42,11 @@ namespace CGAL {
|
||||||
typedef typename Point::Cartesian_const_iterator Iterator;
|
typedef typename Point::Cartesian_const_iterator Iterator;
|
||||||
typedef Cartesian_iterator<Point,Functor> Self;
|
typedef Cartesian_iterator<Point,Functor> Self;
|
||||||
|
|
||||||
|
typedef decltype(std::declval<Functor>()(
|
||||||
typedef typename std::iterator_traits<Iterator>::value_type
|
*std::declval<Iterator>(),
|
||||||
Coordinate_type;
|
*std::declval<Iterator>())) value_type;
|
||||||
|
typedef value_type reference;
|
||||||
typedef decltype(
|
typedef const value_type* pointer;
|
||||||
std::declval<Functor>()(std::declval<Coordinate_type>(),
|
|
||||||
std::declval<Coordinate_type>())) value_type;
|
|
||||||
typedef value_type& reference;
|
|
||||||
typedef value_type* pointer;
|
|
||||||
typedef std::ptrdiff_t difference_type;
|
typedef std::ptrdiff_t difference_type;
|
||||||
typedef std::input_iterator_tag iterator_category;
|
typedef std::input_iterator_tag iterator_category;
|
||||||
|
|
||||||
|
|
@ -96,7 +92,7 @@ namespace CGAL {
|
||||||
return tmp;
|
return tmp;
|
||||||
}
|
}
|
||||||
|
|
||||||
value_type operator*() const { return f(*pb, *qb); }
|
reference operator*() const { return f(*pb, *qb); }
|
||||||
pointer operator->() const { return &(**this); }
|
pointer operator->() const { return &(**this); }
|
||||||
|
|
||||||
const Functor& functor() const { return f; }
|
const Functor& functor() const { return f; }
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue