spirit icon indicating copy to clipboard operation
spirit copied to clipboard

prefer auto to Rng::(const_)?iterator for generic String

Open wanghan02 opened this issue 1 year ago • 1 comments

  1. c++20 ranges library does not require a range to have member type/alias iterator/const_iterator.
  2. boost range library uses typename boost::range_iterator<Rng>::type instead of Rng::iterator because a customized Rng may not have member type/alias iterator/const_iterator. e.g. std::pair<It, It>.

Therefore for generic String type, auto is better than Rng::(const_)?iterator.

wanghan02 avatar Jul 20 '23 10:07 wanghan02

The changes in this commit are all in x3 folder with std14 at least. Somehow CI fails in some std03/11 karma/qi builds.

wanghan02 avatar Aug 16 '23 12:08 wanghan02