Remove use of std::iterator#45
Remove use of std::iterator#45ryanhaining merged 2 commits intoryanhaining:masterryanhaining/cppitertools:masterfrom nvander1:remove_std_iteratorCopy head branch name to clipboard
Conversation
range.hpp
Outdated
| using value_type = T; | ||
| using difference_type = std::ptrdiff_t; | ||
| using pointer = value_type*; | ||
| using reference = value_type&; |
There was a problem hiding this comment.
here's the annoying thing, the way range() is set up, reference is still T rather than T&. I've stressed over this a lot and questioned std::vector::iterator in the process, unfortunately reference = T is the current state of things
|
Holy shit! Thank you for doing this. I have one comment about range() but other than that this looks great. Much appreciated |
Range<T>::Iterator::reference == Range<T>::Iterator::value_type
|
No problem! Fixed up that using alias in Range::Iterator. That's an odd quirk about the std::vector. I just looked through 7.3.0/bits/stl_bvector.h to check out that proxy _Bit_reference object. Coincidentally, std::vector::iterator still indirectly inherits from std::iterator. |
|
merged into cpp17 as well. I just looked at your profile that you going to Binghamton, did I meet you on my recruiting trips a couple years ago? |
|
Yeah we met briefly. You also gave Jack, Ethan and I some suggestions on that C++ web-browser hackathon project that we unfortunately never did anything with after the hackathon. |
|
I didn't really expect anyone to continue working on that browser, it was more of me being a c++ teacher |
In response to #31.
I tried running clang-format with your .clang-format file but it also made changes on lines I hadn't touched,
so I undid those changes.
You can
grep -rs 'std::iterator<' .to double check that all inheritances fromstd::iteratorare gone.