Skip to content
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

Enable copy assignment operator for iterator class #389

Merged

Conversation

DavisVaughan
Copy link
Member

@DavisVaughan DavisVaughan commented Aug 22, 2024

Closes #360
Closes #334

Expands on 686ae04 to carry over some of these changes to iterator as well (i.e., not just const_iterator). Note that I have not changed iterator to be a random_access_iterator_tag, I left it as a forward_iterator_tag. Making a random access iterator requires many extra methods. I don't even think we implement all of them for const_iterator. I've added some comments about that and if we have issues in the future with iterators we should look and see if we just need more methods.

@DavisVaughan
Copy link
Member Author

DavisVaughan commented Aug 22, 2024

@h-vetinari I am expecting this to fix your conda issues! I can't test though, so if you can do so, that would be appreciated.

This re-enables the copy assignment operator that was implicitly deleted for the `iterator` class, and also cleans some things up since we don't need the duplicate `data_` reference
It seems that the toolchain on 3.6 Windows did not have these implemented yet
@DavisVaughan DavisVaughan force-pushed the feature/copy-assignment-writable-iterator branch from 3340550 to efa7733 Compare August 22, 2024 20:18
@DavisVaughan DavisVaughan merged commit 6a2bc9b into r-lib:main Aug 22, 2024
16 checks passed
@DavisVaughan DavisVaughan deleted the feature/copy-assignment-writable-iterator branch August 22, 2024 20:40
@h-vetinari
Copy link

Tested in conda-forge/r-arrow-feedstock#94 using conda-forge/r-cpp11-feedstock#27, and it works! 🥳

Thank you very much! Looking forward to 0.4.8!

@DavisVaughan
Copy link
Member Author

Awesome!

@h-vetinari
Copy link

Thank you very much! Looking forward to 0.4.8!

Is there any timeline for this? :)

@DavisVaughan
Copy link
Member Author

It's on cran

@h-vetinari
Copy link

Ah, I was looking at the git tags in repo here and didn't see anything past 0.4.7. Would still be good to tag the versions you release IMO. 🙃

Thanks for the quick response!

@DavisVaughan
Copy link
Member Author

Woops i normally do. Added now https://github.com/r-lib/cpp11/releases/tag/v0.5.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

BUG: cannot compile r-cpp11 when using MSVC's STL as C++ stdlib std::max_element fails on writable vectors
2 participants