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.