[Issue 12530] New: uniform initialization for type tuples too

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sun Apr 6 12:14:31 PDT 2014


https://d.puremagic.com/issues/show_bug.cgi?id=12530

           Summary: uniform initialization for type tuples too
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: enhancement
          Priority: P2
         Component: DMD
        AssignedTo: nobody at puremagic.com
        ReportedBy: monarchdodra at gmail.com


--- Comment #0 from monarchdodra at gmail.com 2014-04-06 12:14:28 PDT ---
Not sure if enhancement request or bug, but filing as EH.

I think these should work:

//----
    auto a = TypeTuple!(int, int, int)(); //(0, 0, 0)
    auto b = TypeTuple!(int, int, int)(1); //(1, 1, 1)
    //auto c = TypeTuple!(int, int, int)(1, 2); //Should fail
    auto d = TypeTuple!(int, int, int)(1, 2, 3); //(1, 2, 3)
//----

Currently they all produce:
Error: function expected before (), not (int, int, int) of type (int, int, int)

In particular, I think this should work:
//----
    TypeTuple!(int, int, int) a = ...;
    TypeTuple!(int, int, int) b = TypeTuple!(int, int, int)(a);
//----
Though arguably, it's the exactly the same as the "d" case above.

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


More information about the Digitalmars-d-bugs mailing list