-
Notifications
You must be signed in to change notification settings - Fork 67
boost::transform_iterator does not typedef iterator_category #88
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
The The problem is that the |
@Lastique ah I had misread the class hierarchy. However, someone had pointed out that https://en.cppreference.com/w/cpp/iterator/bidirectional_iterator#Notes says |
|
Ah, scratch my last reply. The issue is actually that the |
https://www.boost.org/doc/libs/1_85_0/libs/iterator/doc/transform_iterator.html says it typedefs
iterator_category
based on the underlying iterator. However, nothing in https://github.com/boostorg/iterator/blob/develop/include/boost/iterator/transform_iterator.hpp seems to indicate that it's doing so.With llvm/llvm-project#112102 disallowing std::prev(non_cpp17_bidi_iterator), we have code that breaks due to
transform_iterator
not being bidi even though the underlying iterator is.Example: https://godbolt.org/z/a6TzjGW91
adding something like
using iterator_category = std::iterator_traits<Iterator>::iterator_category;
arounditerator/include/boost/iterator/transform_iterator.hpp
Line 93 in 4b40364
The text was updated successfully, but these errors were encountered: