I am not agree. In STL, distances between random access iterators are
signed (they supports arithmetic operators + and -). For instance, for
pointers, difference_type is basically ptrdiff_t, which is a signed integer
type. See http://www.cplusplus.com/reference/iterator/iterator_traits/


2014-04-19 10:16 GMT+02:00 David Coeurjolly <notifications@github.com>:

> In src/DGtal/geometry/curves/ArithmeticalDSL.h:
>
> > +      /**
> > +       * Moves @a myCurrentPoint lying at position i to the
> > +       * point of the DSL lying at position i + @a aShift
> > +       * @param aShift position difference
> > +       * NB: in O(1)
> > +       */
> > +      void advance(const Position& aShift);
> > +
> > +      /**
> > +       * Computes the distance between *this and @a aOther, ie.
> > +       * the difference between their positions
> > +       * @param aOther any other iterator
> > +       * @return distance between the two iterators
> > +       */
> > +      Position distance_to(const ConstIterator& aOther) const;
> > +
>
> In classical STL concepts, the return type of "distance_to" is an unsigned
> scalar.
> Position could also have been typdefed as an unsigned version of
> TCoordinate, what do you think ?
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/DGtal-team/DGtal/pull/801/files#r11792918>
> .
>