How can I save a class use the RedBlackTree?
Jonathan M Davis via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Tue May 3 05:12:04 PDT 2016
On Tue, 3 May 2016 11:37:13 +0200
Steven Schveighoffer via Digitalmars-d-learn
<digitalmars-d-learn at puremagic.com> wrote:
> bleh, Object.opCmp only works with mutable objects. Which means
> RedBlackTree cannot work with objects because it uses inout to ensure
> your objects are not modified (since 2.068)
>
> It doesn't work with const or immutable either, the only possible
> solution is to go back to mutable only.
>
> So annoying, we need to fix Object.opCmp, or using const/immutable
> comparisons with objects doesn't work.
Hopefully someday...
https://issues.dlang.org/show_bug.cgi?id=9770
- Jonathan M Davis
More information about the Digitalmars-d-learn
mailing list