18 Jul
2017
18 Jul
'17
12:44 a.m.
Andrey Semashev wrote:
Strictly speaking, boost::next/prior is not tied to iterators; it is compatible with any type that has the necessary operators (e.g. integers).
Is it possible to deprecate the use of boost::next/prior for non-iterator types? For non-iterator types, boost::next requires op+ or op+= (and similarly boost::prior requires op- or op-=). I think we can just use op+, unless the type has op+= but not op+. Regards, Michel