Bug 14462 – cannot instantiate redBlackTree!int(); anymore

Status
RESOLVED
Resolution
DUPLICATE
Severity
regression
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2015-04-18T16:27:00Z
Last change time
2015-04-20T21:58:43Z
Keywords
rejects-valid
Assigned to
nobody
Creator
r.sagitario

Comments

Comment #0 by r.sagitario — 2015-04-18T16:27:24Z
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.
Comment #1 by code — 2015-04-20T21:58:43Z
*** This issue has been marked as a duplicate of issue 14468 ***