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

Allow some iterators to be used in standard C++ iterator functions #2106

Merged
merged 1 commit into from Feb 5, 2024

Conversation

Bo98
Copy link
Contributor

@Bo98 Bo98 commented Jan 8, 2024

Some iterators are implemented to be like std::iterator but don't actually allow themselves to be used where std::iterator can usually be used, because of some missing trait information. This PR adds that information.

I've not touched simdjson::ondemand::{array,object}_iterator as I don't think these can be valid standard iterators given the MUST ONLY BE CALLED ONCE PER ITERATION comment for operator*.

@lemire
Copy link
Member

lemire commented Jan 8, 2024

Running tests.

@Bo98
Copy link
Contributor Author

Bo98 commented Jan 8, 2024

Whoops forgot to git add something - that'll explain how it worked locally.

@Bo98
Copy link
Contributor Author

Bo98 commented Jan 8, 2024

Also rebased on master which should stop the whitespace check from failing.

@lemire
Copy link
Member

lemire commented Jan 9, 2024

Running tests.

@lemire
Copy link
Member

lemire commented Feb 5, 2024

Merging.

@lemire lemire merged commit 33610b5 into simdjson:master Feb 5, 2024
42 checks passed
@Bo98 Bo98 deleted the stl-iterator branch February 5, 2024 22:56
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.

None yet

2 participants