Closed jmalkin closed 1 year ago
Totals | |
---|---|
Change from base Build 4049479609: | 0.0% |
Covered Lines: | 2329 |
Relevant Lines: | 2481 |
I think this is not quite right, and we did not do it quite right so far. operator*() should return reference but the reference can be defined to be the same as value_type for LegacyInputIterator in such cases when we return a proxy object by value
https://en.cppreference.com/w/cpp/named_req/InputIterator#Concept
"The reference type for an input iterator that is not also a LegacyForwardIterator does not have to be a reference type: dereferencing an input iterator may return a proxy object or value_type itself by value (as in the case of std::istreambuf_iterator)"
Addressed the issues identified with the FI hash map iterator
So is the suggestion that we should do that everywhere, including defining operator*() where it doesn't currently exist?
I think this approach with reference = value_type should be used everywhere we return a proxy object (all quantiles)
how can operator*() not exist?
I think this is ready for review pass 2
including defining operator*() where it doesn't currently exist
You must be talking about operator-> I think I added it everywhere except the reverse purge hash map, which is for internal use
You must be talking about operator->
Yeah, that seems to be what I had in mind. It seems to have been missed for one of the sampling iterators so I'll see if I can get that in. Right now my local build has some sort of test failure so I clearly screwed up something.
Now I think it really is ready for re-review
Not entirely confident on all the difference types, and I punted on the pointer type to a std::pair<> we return since I don't think it'll matter with how we use things.
Anyway, I don't expect this to be the final version but this does at least seem to work with both gcc and clang (14) for a few different c++ standards (11 and 20 at least)