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

Ordered vector of group names to preserve order of groups #416

Merged
merged 1 commit into from
Jan 15, 2024

Conversation

nigels-com
Copy link
Contributor

@nigels-com nigels-com commented Jan 13, 2024

Thanks for cxxopts, it's fits nicely with our needs.

I experimented with the grouping support today. I noticed that the order of the groups isn't insertion order - it's based on the std::map comparator. So I felt that we could add a std::vector of the group names here in the order of insertion. Two benefits:

  • The order of groups in the C++ code (insertion order) will match the -h output.
  • The order of groups in the output will be deterministic and predictable, even across platforms and toolchains.

For consideration.


This change is Reviewable

@jarro2783
Copy link
Owner

Thanks, looks good.

@jarro2783 jarro2783 merged commit cd61c68 into jarro2783:master Jan 15, 2024
10 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