Bug 14174 – Weird IFTI deduction failure

Status
RESOLVED
Resolution
FIXED
Severity
major
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2015-02-12T14:48:00Z
Last change time
2017-07-19T17:38:33Z
Keywords
pull, rejects-valid
Assigned to
nobody
Creator
k.hara.pg

Comments

Comment #0 by k.hara.pg — 2015-02-12T14:48:26Z
From: http://forum.dlang.org/thread/[email protected] Following code should work, but doesn't. struct CborConfig(a, b) {} struct NonSerialized {} alias defaultCborConfig = CborConfig!(NonSerialized, NonSerialized); void accepter(Config : CborConfig!(T) = defaultCborConfig, T...)() { pragma(msg, T); } void main() { //accepter!()(); // ok accepter(); // Line 15 } output: test.d(15): Error: template test.accepter cannot deduce function from argument types !()(), candidates are: test.d(7): test.accepter(Config : CborConfig!T = defaultCborConfig, T...)()
Comment #1 by k.hara.pg — 2015-02-12T16:36:50Z
Comment #2 by github-bugzilla — 2015-02-18T06:34:30Z
Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/0c853825e5d3ee0d8cd616a63eca61675b183f63 fix Issue 14174 - Weird IFTI deduction failure https://github.com/D-Programming-Language/dmd/commit/49d25b3e942e87ac888dfc08450d8fabe6b7484f Merge pull request #4408 from 9rnsr/fix14174 Issue 14174 - Weird IFTI deduction failure
Comment #3 by github-bugzilla — 2015-02-21T09:11:37Z
Comment #4 by github-bugzilla — 2015-06-17T21:00:50Z
Comment #5 by github-bugzilla — 2017-07-19T17:38:33Z
Commits pushed to dmd-cxx at https://github.com/dlang/dmd https://github.com/dlang/dmd/commit/0c853825e5d3ee0d8cd616a63eca61675b183f63 fix Issue 14174 - Weird IFTI deduction failure https://github.com/dlang/dmd/commit/49d25b3e942e87ac888dfc08450d8fabe6b7484f Merge pull request #4408 from 9rnsr/fix14174