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

[22_2] make iterator iterable with range based for loop #324

Merged
merged 1 commit into from
May 23, 2024

Conversation

jingkaimori
Copy link
Contributor

No description provided.

@jingkaimori jingkaimori changed the title make iterator usable with range based for loop make iterator iterable with range based for loop May 19, 2024
@Oyyko
Copy link

Oyyko commented May 20, 2024

LGTM

for (auto i : iterate (h)) {
a << as_string (i);
}
string_eq (a, "123");
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are the elements in our hashmap arranged in insertion order?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

According to prior tests in this file, orders is arranged as you said.

Copy link
Collaborator

@Charonxin Charonxin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

According to my experience, the entry in hashmap/hashset is out of order. Maybe this is a special feature in texmacs?

@da-liii da-liii changed the title make iterator iterable with range based for loop [22_2] make iterator iterable with range based for loop May 23, 2024
@da-liii da-liii merged commit 1e93ae7 into main May 23, 2024
12 checks passed
@da-liii da-liii deleted the jingkaimori/ranged-for-iterator branch May 23, 2024 07:16
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.

4 participants