Skip to content

Switch to the new iterator idiom in all rules - #548

Merged
nunoplopes merged 10 commits into
Cpp2Rust:masterfrom
lucic71:remaining-iterator
Oct 19, 2026
Merged

nunoplopes merged 10 commits into
Cpp2Rust:masterfrom
lucic71:remaining-iterator

Conversation

@lucic71

@lucic71 lucic71 commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

I also deleted the old PtrValueIter because it assumed that the inputs were random access iterators. This assumption is wrong for weaker iterator categories, for example bidirectional, see tests/unit/vector_iter_range_ctor.cpp:

// the iterator of map is bidirectional
std::map<int, int> m;
// the iterator of vector is random access, the the arguments (m.begin(), m.end())
// are bidirectional where PtrValueIter does not work
std::vector<std::pair<int, int>> v6(m.begin(), m.end());

@nunoplopes
nunoplopes merged commit 2aaaff4 into Cpp2Rust:master Oct 19, 2026
4 of 9 checks passed
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