[Issue 8947] New: redBlackTree() of fixed size arrays
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Fri Nov 2 12:40:53 PDT 2012
http://d.puremagic.com/issues/show_bug.cgi?id=8947
Summary: redBlackTree() of fixed size arrays
Product: D
Version: D2
Platform: x86
OS/Version: Windows
Status: NEW
Keywords: accepts-invalid, rejects-valid
Severity: normal
Priority: P2
Component: Phobos
AssignedTo: nobody at puremagic.com
ReportedBy: bearophile_hugs at eml.cc
--- Comment #0 from bearophile_hugs at eml.cc 2012-11-02 12:40:52 PDT ---
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])
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list