Template Function lanelet::helper::forEachPairUntil

Function Documentation

template<typename FwIter, typename Func>
FwIter lanelet::helper::forEachPairUntil(FwIter first, FwIter end, Func f)

Apply a function of all pairs in a sequenc in sorted order until a predicate returns true.

Works similar to forEachPair but stops if f returns true. Useful for implementing a search on segments.

Parameters:
  • first – begin of the range to iterate over

  • end – end of the range to iterate over

  • f – function returning something convertible to bool. If the result is true, the iteration is stopped

Returns:

Iterator to the first element of the pair that returned true or end