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

           Summary: `std.range.zip` fails to compile if range elements
                    aren't default contructable
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Keywords: rejects-valid
          Severity: normal
          Priority: P2
         Component: Phobos
        AssignedTo: [email protected]
        ReportedBy: [email protected]


--- Comment #0 from Denis Shelomovskij <[email protected]> 2013-10-08 
17:07:04 MSD ---
Insted it should throw if range with non default contructable elements is
exhausted:
---
import std.exception, std.range;

void main()
{
    static struct S { @disable this(); }
    static assert(__traits(compiles, zip((S[5]).init[]))); // assert fails
    // This is assumed to compile and pass:
    assertThrown(zip(StoppingPolicy.longest, cast(S[]) null, new
int[1]).front);
}
---

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

Reply via email to