On Tue, Dec 17, 2019 at 9:59 AM Arthur Gruzauskas via Boost < boost@lists.boost.org> wrote:
On Wednesday, 11 December 2019 11:21:23 AM AEDT Barrett Adair via Boost wrote:
Dear Boost,
The formal review of Zach Laine's STLInterfaces library begins now, and will run through December 19. Please participate in this review if you can. To submit a review, please reply to this email with the following information: - Your name
Arthur Gruzauskas
Thanks for the review, Arthur! [snip]
- Did you attempt to use the library? If so:
* Which compiler(s)?
clang-8 for c++17 on debian linux.
* What was the experience? Any problems?
very straightforward.
a few small glitches, as I just grabbed iterator_interface.hpp and fwd.hpp and made small changes for it to work inside my project.
https://github.com/tzlaine/stl_interfaces/issues describes two minor issues, which could be well related to me just grabbing those 2 files only, outside the boost structure that would normally sustain it.
For others following this, these issues are resolved for me locally, but will not appear publicly during the review. The issue is a missing defined() in a couple of preprocessor expressions. [snip]
My one small concern is in the required method:
constexpr auto operator-(repeated_chars_iterator other) const noexcept
instead of:
constexpr auto operator-(const repeated_chars_iterator& other) const noexcept
I may soon have a need for an iterator that holds a lot of state, and copying that iterator for each subtraction makes me wonder about a performance penalty in inner loops.
It is not a dealbreaker for this review, and I didn't examine Zach's tradeoffs for doing it this way. I see many of my use cases where this approach will be fine.
In short, I'm doing this for two reasons: 1) An iterator type is typically the size of a pointer or maybe two, and so pass-by-value is usually more optimal than pass-by-reference. 2) All the STL interfaces that take iterators do it this way, and so making the STLInterfaces usage pass-by-reference probably won't affect >= 90% of your uses of a given iterator type. Zach