www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 14462] New: cannot instantiate redBlackTree!int(); anymore


          Issue ID: 14462
           Summary: cannot instantiate redBlackTree!int(); anymore
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Keywords: rejects-valid
          Severity: regression
          Priority: P1
         Component: DMD
          Assignee: nobody puremagic.com
          Reporter: r.sagitario gmx.de

From druntime/benchmark/gcbecnh/tree2.d:
import std.container; void main(string[] args) { auto t = redBlackTree!int(); } compile with dmd from git-HEAD: tree2.d(18): Error: template std.container.rbtree.redBlackTree cannot deduce function from argument types !(int)(), candidates are: rbtree.d(1714): std.container.rbtree.redBlackTree(E)(E[] elems...) rbtree.d(1720): std.container.rbtree.redBlackTree(bool allowDuplicates, E)(E[] elems...) rbtree.d(1726): std.container.rbtree.redBlackTree(alias less, E)(E[] elems...) rbtree.d(1732): std.container.rbtree.redBlackTree(alias less, bool allowDuplicates, E)(E[] elems...) if (is(typeof(binaryFun!less This works with dmd 2.067. Adding a function argument makes it compile, too. As there has been little changes to rbtree.d recently, it's probably a dmd regression. --
Apr 18 2015