Talk:cpp/iterator/next
This will need to be adjusted when http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#2353 is included in the WP / accepted as a DR. Or should we add this change already?
dyp --84.162.12.139 04:02, 11 August 2015 (PDT)
- I think status "Ready" means it is reasonably safe to put it under "C++17" tag (not C++14 because of apparent LWG guidance). --Cubbi (talk) 06:12, 11 August 2015 (PDT)
[edit] Possible implementation
The possible implementation of next seems to alter the argument it (through the operation advance) but in the Example code the iterator it is left unchanged, as it should be according the standard.
The description "Return the nth successor of iterator it" is correct, but the possible implementation is misleading.
--37.77.127.131 05:38, 3 September 2017 (PDT) Giuseppe Argentieri (3 Sep 2017)
- It's taken by value. How is it misleading? T. Canens (talk) 12:19, 3 September 2017 (PDT)
- Yep, it was my mistake... G. Argentieri --62.170.77.42 01:02, 17 September 2017 (PDT)
[edit] Complexity?
At std::advance I see that complexity is linear, but it is constant if iterator meets RandomAccessIterator concept. There is no complexity information here at all.