Skip to content

libutil: Make CanonPath a proper range#14568

Merged
Ericson2314 merged 1 commit into
masterfrom
proper-range-canon-path
Nov 15, 2025
Merged

libutil: Make CanonPath a proper range#14568
Ericson2314 merged 1 commit into
masterfrom
proper-range-canon-path

Conversation

@xokdvium
Copy link
Copy Markdown
Contributor

Motivation

This was we can use std::ranges algorithms on it. Requires making the iterator a proper forward iterator type as well.

Adds static asserts to check that the types satisfy basic requirements.

Removes redundant operator!=, because since C++20 compilers deduce it from operator==.

Context


Add 👍 to pull requests you find important.

The Nix maintainer team uses a GitHub project board to schedule and track reviews.

This was we can use std::ranges algorithms on it. Requires
making the iterator a proper forward iterator type as well.
@xokdvium xokdvium requested a review from edolstra as a code owner November 14, 2025 19:47
@xokdvium xokdvium requested a review from Ericson2314 November 14, 2025 19:48
Copy link
Copy Markdown
Member

@Ericson2314 Ericson2314 left a comment

Choose a reason for hiding this comment

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

This is beyond my knowledge, but I trust @xokdvium and also the static asserts.

@Ericson2314 Ericson2314 added this pull request to the merge queue Nov 15, 2025
Merged via the queue into master with commit 1f2a994 Nov 15, 2025
20 checks passed
@Ericson2314 Ericson2314 deleted the proper-range-canon-path branch November 15, 2025 17:54
@edolstra edolstra mentioned this pull request Dec 9, 2025
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