-
Notifications
You must be signed in to change notification settings - Fork 68
Fusion based zip_iterator, close #7526 #2
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
Conversation
By default, backward compatibility for Boost.Tuple is presented. Signed-off-by: Kohei Takahashi <flast@flast.jp>
Signed-off-by: Kohei Takahashi <flast@flast.jp>
Signed-off-by: Kohei Takahashi <flast@flast.jp>
Signed-off-by: Kohei Takahashi <flast@flast.jp>
Signed-off-by: Kohei Takahashi <flast@flast.jp>
Signed-off-by: Kohei Takahashi <flast@flast.jp>
👍 to this patch, any plans to merge it in? I'd love to be able to use zip_iterator with std::tuples. |
Signed-off-by: Kohei Takahashi <flast@flast.jp>
👍 from me as well. We have been waiting for this feature for too long already. |
Note again, next release (i.e. 1.58.0) includes boostorg/fusion#7. |
I have tested this out and it is working fine. The docs for zip_iterator need to be updated to explain what the tuple type may be. I am willing to do this myself. Am I correct that the tuple type for zip_iterator may be a std::tuple, a boost::tuple, or any fusion sequence ? Or are we limited in any way by the fusion sequence we specify ? |
My tests show that the implementation is failing if the tuple is a boost::fusion::deque. The failing is occurring when the code attempts to dereference a zip_iterator. The failing code, without the appropriate header files, is:
Once the dereference of *zip_it_mixed occurs we get the errors:
I need some explanation for this or some resolution of this before I can push the PR. I think the PR has great merit but it either needs to work in all relevant cases or the reason it will not work with the fusion container boost::fusion::deque needs to be explained in the documentation. It does work with both boost::fusion::vector and boost::fusion::list as the tuple for the tuple of iterators in your implementation. |
I discovered that the problem with boost::fusion::deque is in the fusion library and submitted a trac ticket against that problem at https://svn.boost.org/trac/boost/ticket/11572. |
Fusion based zip_iterator, close #7526
Thank you.
It requires at least Forward Sequence, i.e. any fusion sequence should be accepted.
Thanks, I will investigate and fix it until next release. |
I updated the iterator tests in order to test out specific fusion sequences as the tuple iterator for the zip_iterator. I added a test for the fusion deque sequence but commented it out in the jamfile. When a fix appears for trac ticket 11572, I will uncomment that test. Are you helping to maintain Boost fusion ? If so fusion really needs tests for the generic sequence 'convert' functionality. I think the reason that the bug for trac ticket 11572 exists is that there are no fusion tests for the generic sequence 'convert' functionality, else the bug would have been found much earlier. |
Definitely. Now, I open a PR to fix ticket 11572 and added tests for converting each other. |
Is this PR related to Trac ticket 12895?
|
I reimplement zip_iterator with Boost.Fusion to support other tuple implementations.
And backward compatibility for Boost.Tuple should be appeared.
Notes for release manager: This change depends on boostorg/fusion#7 (already merged into develop, but not merged yet into master/release).
Ticket: https://svn.boost.org/trac/boost/ticket/7526