
David Abrahams wrote:
Daniel Frey <daniel.frey@aixigo.de> writes:
Providing the implementation for next/prior in the documentation might be sufficient for the one-argument-version, but for the two argument version it's quite hard to help getting the implementation bug-free if I don't know what you intended. Can you write down original intent, please?
Well, you came up with the 2-arg version.
That was Daniel Wallin (too many Daniels error?). I guess this also explains why I had the feeling we were talking past each other a bit :)
I can only say that the original intent of the 1-arg versions was to operate on anything supporting prefix ++/--, respectively. If the 2-arg version won't do that, I guess we should change the name.
OK, I understand now that I have to distinguish the 1-arg version from the 2-arg version.
Incidentally, it's almost always possible to detect whether the first argument supports operator += or operator-=. That might be a good way to decide whether to advance/regress it.
If is_iterator yields false, this is good to distinguish the rest, yes. But the first question is, whether we want to enhance the 2-arg version of next/prior or if we simply rename them to e.g. advanced/regressed. I'd be happy with the latter. Comments? Regards, Daniel -- Daniel Frey aixigo AG - financial solutions & technology Schloß-Rahe-Straße 15, 52072 Aachen, Germany fon: +49 (0)241 936737-42, fax: +49 (0)241 936737-99 eMail: daniel.frey@aixigo.de, web: http://www.aixigo.de