www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 1780] New: Type tuple deduction failure for class templates

reply d-bugmail puremagic.com writes:
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 digitalmars.com
        ReportedBy: paul_m_doc 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!

-----------------


arguments but even that crashes the compiler.


-- 
Jan 10 2008
next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=1780


Kenji Hara <k.hara.pg gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |pull



https://github.com/D-Programming-Language/dmd/pull/958

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
May 20 2012
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=1780




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


Issue 1780 & 3608 & 8125 - Fix TypeInstance deduction problems

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
May 20 2012
prev sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=1780


Walter Bright <bugzilla digitalmars.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |bugzilla digitalmars.com
         Resolution|                            |FIXED


-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
May 20 2012