digitalmars.D.bugs - [Issue 5640] New: error with constructing RedBlackTree from range of array (typesafe variadics)
- d-bugmail puremagic.com (26/26) Feb 22 2011 http://d.puremagic.com/issues/show_bug.cgi?id=5640
- d-bugmail puremagic.com (8/8) Feb 22 2011 http://d.puremagic.com/issues/show_bug.cgi?id=5640
- d-bugmail puremagic.com (13/13) Jul 23 2012 http://d.puremagic.com/issues/show_bug.cgi?id=5640
http://d.puremagic.com/issues/show_bug.cgi?id=5640 Summary: error with constructing RedBlackTree from range of array (typesafe variadics) Product: D Version: D2 Platform: All OS/Version: Linux Status: NEW Severity: normal Priority: P2 Component: Phobos AssignedTo: nobody puremagic.com ReportedBy: lutger.blijdestijn gmail.com --- Comment #0 from Lutger <lutger.blijdestijn gmail.com> 2011-02-22 01:29:22 PST --- The following does not compile: auto tree = RedBlackTree!string("foo", "bar", "baz"); Error message: Error: template std.container.RedBlackTree!(string).RedBlackTree.__ctor(U) if (isImplicitlyConvertible!(U,Elem)) does not match any function template declaration Error: template std.container.RedBlackTree!(string).RedBlackTree.__ctor(U) if (isImplicitlyConvertible!(U,Elem)) cannot deduce template function from argument types !()(string,string,string) -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Feb 22 2011
http://d.puremagic.com/issues/show_bug.cgi?id=5640 --- Comment #1 from Lutger <lutger.blijdestijn gmail.com> 2011-02-22 01:30:04 PST --- It is an issue with type inference from typesafe variadics, the constructor for RedBlackTree deduces U to immutable(char) rather than string: this(U)(U[] elems...) if (isImplicitlyConvertible!(U, Elem)) -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Feb 22 2011
http://d.puremagic.com/issues/show_bug.cgi?id=5640 Ellery Newcomer <ellery-newcomer utulsa.edu> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED CC| |ellery-newcomer utulsa.edu Resolution| |WORKSFORME --- Comment #2 from Ellery Newcomer <ellery-newcomer utulsa.edu> 2012-07-23 14:49:42 PDT --- auto tree = redBlackTree!string("foo", "bar", "baz"); compiles with dmd 2.059 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Jul 23 2012