1780 – Type tuple deduction failure for class templates

D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 1780 - Type tuple deduction failure for class templates
Summary: Type tuple deduction failure for class templates
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D2
Hardware: x86 Windows
: P2 major
Assignee: No Owner
URL:
Keywords: pull, rejects-valid
Depends on:
Blocks:
Reported: 2008年01月10日 14:13 UTC by Paul Doherty
Modified: 2015年06月09日 01:14 UTC (History)
1 user (show)

See Also:


Attachments
Add an attachment (proposed patch, testcase, etc.)

Note You need to log in before you can comment on or make changes to this issue.
Description Paul Doherty 2008年01月10日 14:13:19 UTC
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 Kenji Hara 2012年05月20日 09:51:07 UTC
https://github.com/D-Programming-Language/dmd/pull/958 
Comment 2 github-bugzilla 2012年05月20日 12:48:18 UTC
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


AltStyle によって変換されたページ (->オリジナル) /