Bug 4759 – Generic matching not working with alias parameters

Status
RESOLVED
Resolution
WORKSFORME
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
Other
OS
Linux
Creation time
2010-08-29T11:46:00Z
Last change time
2015-02-18T03:40:18Z
Assigned to
nobody
Creator
andrei

Comments

Comment #0 by andrei — 2010-08-29T11:46:41Z
Consider: struct A(alias pred) {} void fun(alias pred)(A!(pred) ax) {} void main() { A!("x") a; fun(a); } Result: Error: template test.fun(alias pred) does not match any function template declaration Error: template test.fun(alias pred) cannot deduce template function from argument types !()(A!("")) The code works as expected if the alias is replaced with a type parameter.
Comment #1 by k.hara.pg — 2013-02-20T07:46:35Z
Works in 2.063alpha.
Comment #2 by github-bugzilla — 2014-12-02T18:05:41Z
Commit pushed to master at https://github.com/D-Programming-Language/phobos https://github.com/D-Programming-Language/phobos/commit/a2450fd1a563575c800c37b1d351ed3ae0d11de8 Properly document BoyerMooreFinder Before it was ditto-ing the find(haystack, needles) docs which return a tuple instead. Move boyerMooreFinder above the struct so ddoc finds a parameter name. Remove note about bug 4759, which is now resolved.
Comment #3 by github-bugzilla — 2015-02-18T03:40:18Z