[Issue 6474] New: aliasing type tuple elements' members is onerous

d-bugmail at puremagic.com d-bugmail at puremagic.com
Thu Aug 11 19:32:05 PDT 2011


http://d.puremagic.com/issues/show_bug.cgi?id=6474

           Summary: aliasing type tuple elements' members is onerous
           Product: D
           Version: D2
          Platform: Other
        OS/Version: Linux
            Status: NEW
          Severity: enhancement
          Priority: P2
         Component: DMD
        AssignedTo: nobody at puremagic.com
        ReportedBy: ellery-newcomer at utulsa.edu


--- Comment #0 from Ellery Newcomer <ellery-newcomer at utulsa.edu> 2011-08-11 19:32:04 PDT ---
code like 

struct X(T){
    alias T TT;
}
alias TypeTuple!(int,int, X!string) G;
alias G[2].TT TT; // <-- parse failure

doesn't work. It's just not built in to the D grammar.

Of course, the workaround is simply

alias G[2] G2;
alias G2.TT TT;

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


More information about the Digitalmars-d-bugs mailing list