Skip to content

[stable] std.container.rbtree: Refactor template constraint wrt. less and use it for redBlackTree() functions too#10951

Merged
thewilsonator merged 1 commit intodlang:stablefrom
kinke:fix_rbtree
Feb 11, 2026
Merged

[stable] std.container.rbtree: Refactor template constraint wrt. less and use it for redBlackTree() functions too#10951
thewilsonator merged 1 commit intodlang:stablefrom
kinke:fix_rbtree

Conversation

@kinke
Copy link
Contributor

@kinke kinke commented Feb 11, 2026

PR #10792 changed the constraint to allow const-ref predicates too, using a lambda - which seems to have a very bad effect on attributes inference. Avoiding the lambda and using std.traits.lvalueOf() instead seems to work better.

Also update the template constraints of the free-standing redBlackTree() functions, which were forgotten in #10792.

…e it for redBlackTree() functions too

PR dlang#10792 changed the constraint to allow const-ref predicates too,
using a lambda - which seems to have a very bad effect on attributes
inference. Avoiding the lambda and using `std.traits.lvalueOf()`
instead seems to work better.

Also update the template constraints of the free-standing
`redBlackTree()` functions, which were forgotten in dlang#10792.
@kinke kinke requested a review from PetarKirov as a code owner February 11, 2026 13:23
@dlang-bot
Copy link
Contributor

Thanks for your pull request and interest in making D better, @kinke! We are looking forward to reviewing it, and you should be hearing from a maintainer soon.
Please verify that your PR follows this checklist:

  • My PR is fully covered with tests (you can see the coverage diff by visiting the details link of the codecov check)
  • My PR is as minimal as possible (smaller, focused PRs are easier to review than big ones)
  • I have provided a detailed rationale explaining my changes
  • New or modified functions have Ddoc comments (with Params: and Returns:)

Please see CONTRIBUTING.md for more information.


If you have addressed all reviews or aren't sure how to proceed, don't hesitate to ping us with a simple comment.

Bugzilla references

Your PR doesn't reference any Bugzilla issue.

If your PR contains non-trivial changes, please reference a Bugzilla issue or create a manual changelog.

Testing this PR locally

If you don't have a local development environment setup, you can use Digger to test this PR:

dub run digger -- build "stable + phobos#10951"

@thewilsonator thewilsonator merged commit b9a61a8 into dlang:stable Feb 11, 2026
14 of 17 checks passed
@kinke kinke deleted the fix_rbtree branch February 11, 2026 22:35
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