Skip to content

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

Merged
lemire merged 1 commit intosimdjson:masterfrom
Bo98:stl-iterator
Feb 5, 2024
Merged

Allow some iterators to be used in standard C++ iterator functions#2106
lemire merged 1 commit intosimdjson:masterfrom
Bo98:stl-iterator

Conversation

@Bo98
Copy link
Copy Markdown
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
Copy Markdown
Member

lemire commented Jan 8, 2024

Running tests.

@Bo98
Copy link
Copy Markdown
Contributor Author

Bo98 commented Jan 8, 2024

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

@Bo98
Copy link
Copy Markdown
Contributor Author

Bo98 commented Jan 8, 2024

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

@lemire
Copy link
Copy Markdown
Member

lemire commented Jan 9, 2024

Running tests.

@lemire
Copy link
Copy Markdown
Member

lemire commented Feb 5, 2024

Merging.

@lemire lemire merged commit 33610b5 into simdjson:master Feb 5, 2024
@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.

2 participants