Angus Leeming a écrit :
Abdelrazak Younes wrote:

This is why I had to write "it++" instead of "it+1" in some cases.

Just browing an interesting thread. You're doing great things here Abdel!

Thanks. But I have to convince Lars...

I highlighted the line above because language issues require less thought
than a real code review ;-)

I would be very happy if you could review my code.

"++it" is generally preferable to "it++" for non-pointer iterators (one
less copy).

Of course, it++ is the best replacement for it+1 but for it+n and n>1 the
portable idiom would be "std::advance(it, n);" IIRC.

I know that and I always try to remember to use ++it instead of it++. But you know when doing things quickly...

Thanks,
Abdel

Reply via email to