[Issue 14462] New: cannot instantiate redBlackTree!int(); anymore
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Sat Apr 18 09:27:24 PDT 2015
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 at puremagic.com
Reporter: r.sagitario at 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.
--
More information about the Digitalmars-d-bugs
mailing list