Bug 1780 – Type tuple deduction failure for class templates

Status
RESOLVED
Resolution
FIXED
Severity
major
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
x86
OS
Windows
Creation time
2008-01-10T14:13:00Z
Last change time
2015-06-09T01:14:25Z
Keywords
pull, rejects-valid
Assigned to
nobody
Creator
paul_m_doc

Comments

Comment #0 by paul_m_doc — 2008-01-10T14:13:19Z
Type arguments of class templates should be deducible with the following: template Tuple(Ts ...) { alias Ts Tuple; } template Decode( T ) { alias Tuple!() Types; } template Decode( T : TT!(Us), alias TT, Us... ) { alias Us Types; } struct S2(T1, T2) {} // should extract tuple (bool,short) but matches the first specialisation alias Decode!( S2!(bool,short) ).Types SQ2; // --> SQ2 is empty tuple! ----------------- Issue #1779 tries to workaround this failure by decoding a fixed number of arguments but even that crashes the compiler.
Comment #1 by k.hara.pg — 2012-05-20T09:51:07Z
Comment #2 by github-bugzilla — 2012-05-20T12:48:18Z
Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/71785b48ea16a47e62654f1134cff2eac372f7dc fix Issue 1780 - Type tuple deduction failure for class templates https://github.com/D-Programming-Language/dmd/commit/ed68238cd1e5a7aec454840ee11e04580f974855 Merge pull request #958 from 9rnsr/fix_tided Issue 1780 & 3608 & 8125 - Fix TypeInstance deduction problems