Skip to content

Tidy common::sort_unique and utils.h includes - #4322

Merged
garth-wells merged 1 commit into
mainfrom
jhale/common-utils-review
Jul 27, 2026
Merged

Tidy common::sort_unique and utils.h includes#4322
garth-wells merged 1 commit into
mainfrom
jhale/common-utils-review

Conversation

@jhale

@jhale jhale commented Jul 27, 2026

Copy link
Copy Markdown
Member

No bugs found. Minor modernisation and small memory use optimisation.

  • Constrain sort_unique with std::ranges::input_range concepts instead of bare template parameters.
  • Add missing direct includes (<cstddef>, <cstdint>, <iterator>, <ranges>, <stdexcept>) that were only satisfied transitively.
  • Reserve the deduplicated element count rather than the pre-unique size in the output vectors.
  • Drop a redundant typename, mark read-only lambda parameters const, and more explicit note on the "smallest value retained" invariant.

Co-Authored-By: Claude Opus 4.8 (1M context) noreply@anthropic.com

- Constrain sort_unique with std::ranges::input_range concepts instead
  of bare typename template parameters.
- Add missing direct includes (<cstddef>, <cstdint>, <iterator>,
  <ranges>, <stdexcept>) that were only satisfied transitively.
- Reserve the deduplicated element count rather than the pre-unique
  size in the output vectors.
- Drop a redundant typename, mark read-only lambda parameters const,
  and note the sort-then-unique "smallest value retained" invariant.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@garth-wells
garth-wells added this pull request to the merge queue Jul 27, 2026
Merged via the queue into main with commit 873d0fe Jul 27, 2026
20 checks passed
@garth-wells
garth-wells deleted the jhale/common-utils-review branch July 27, 2026 17:27
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