D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 8896 - RedBlackTree.opEquals has byref semantics
Summary: RedBlackTree.opEquals has byref semantics
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: phobos (show other issues)
Version: D2
Hardware: All All
: P2 normal
Assignee: No Owner
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-10-25 22:12 UTC by Ellery Newcomer
Modified: 2012-10-28 16:01 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Ellery Newcomer 2012-10-25 22:12:06 UTC
code:

import std.container;
import std.stdio;

void main() {
    auto a = make!(RedBlackTree!int)(1,2,3,4);
    auto b = make!(RedBlackTree!int)(1,2,3,4);
    writeln(a == b);
}


result:

false

should be:

true

prognosis:

RedBlackTree.opEquals has not been overridden from Object.opEquals

off topic:

Hi Steve, guess what I'm going to be doing with multi_index sometime this week.
Comment 2 github-bugzilla 2012-10-28 09:00:42 UTC
Commit pushed to master at https://github.com/D-Programming-Language/phobos

https://github.com/D-Programming-Language/phobos/commit/1b7e7eb506baef185f94298af7a534cb13e5bf66
Merge pull request #900 from quickfur/rbtree_opEquals

Implement RedBlackTree.opEquals ... (issue 8896)