April 18, 2015 [Issue 14462] New: cannot instantiate redBlackTree!int(); anymore | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=14462 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. -- |
Copyright © 1999-2021 by the D Language Foundation