[Issue 1780] New: Type tuple deduction failure for class templates
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Thu Jan 10 12:13:20 PST 2008
http://d.puremagic.com/issues/show_bug.cgi?id=1780
Summary: Type tuple deduction failure for class templates
Product: D
Version: 2.009
Platform: PC
OS/Version: Windows
Status: NEW
Keywords: rejects-valid
Severity: major
Priority: P2
Component: DMD
AssignedTo: bugzilla at digitalmars.com
ReportedBy: paul_m_doc at hotmail.com
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.
--
More information about the Digitalmars-d-bugs
mailing list