Comment #0 by bearophile_hugs — 2012-11-02T12:40:52Z
I think redBlackTree() has problems with fixed size arrays:
import std.container: redBlackTree, RedBlackTree;
void main() {
int[2] a;
auto t1 = new RedBlackTree!(typeof(a));
t1.stableInsert(a); // OK
auto t2 = redBlackTree(a);
t2.stableInsert(a); // Error
t2.stableInsert(1); // No error, but it's wrong
}
DMD 2.061alpha gives:
test.d(7): Error: template std.container.RedBlackTree!(int).RedBlackTree.stableInsert does not match any function template declaration
...\dmd2\src\phobos\std\container.d(5834): Error: template std.container.RedBlackTree!(int).RedBlackTree.stableInsert cannot deduce template function from argument types !()(int[2u])