Bug 6961 – template canFind: cannot deduce template function from argument types !(__dgliteral7)(Result)
Status
RESOLVED
Resolution
WORKSFORME
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2011-11-16T15:40:00Z
Last change time
2016-10-15T01:21:58Z
Keywords
rejects-valid
Assigned to
nobody
Creator
hoganmeier
Comments
Comment #0 by hoganmeier — 2011-11-16T15:40:38Z
Tried to compile https://github.com/CyberShadow/DustMite/tree/bf937e91c7a768b4ecc3681c655a269e0a8d3dd8
And here's the completely weird result:
$ dmd -c dustmite.d
$ dmd -c dsplit.d
$ dmd -c dustmite.d dsplit.d
$ dmd -c dsplit.d dustmite.d
dustmite.d(520): Error: template std.algorithm.canFind(alias pred = "a == b",Range,V) if (is(typeof(find!(pred)(range,value)))) does not match any function template declaration
dustmite.d(520): Error: template std.algorithm.canFind(alias pred = "a == b",Range,V) if (is(typeof(find!(pred)(range,value)))) cannot deduce template function from argument types !(__dgliteral7)(Result)
dustmite.d(520): Error: template instance canFind!(__dgliteral7) errors instantiating template
I've tried my best to reduce this, but couldn't get anywhere cause there's no help at all why the constraint failed.
DustMite itself couldn't help either since a proper test command would be needed or it will simply reduce it to crap with a canFind(a) somewhere.
Comment #1 by lt.infiltrator — 2014-03-19T21:55:44Z
Is this still an issue? I have recently compiled dustmite with v2.064 without problems.