www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 11196] New: `std.range.zip` fails to compile if range elements aren't default contructable

reply d-bugmail puremagic.com writes:
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: verylonglogin.reg gmail.com
        ReportedBy: verylonglogin.reg gmail.com


--- Comment #0 from Denis Shelomovskij <verylonglogin.reg gmail.com> 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: -------
Oct 08 2013
next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=11196



--- Comment #1 from Denis Shelomovskij <verylonglogin.reg gmail.com> 2013-10-08
17:09:22 MSD ---
https://github.com/D-Programming-Language/phobos/pull/1619

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Oct 08 2013
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=11196



--- Comment #2 from github-bugzilla puremagic.com 2013-10-08 08:01:14 PDT ---
Commits pushed to master at https://github.com/D-Programming-Language/phobos

https://github.com/D-Programming-Language/phobos/commit/6788a62506f7638c7f7a19637bad9d536b378cb6
Fix Issue 11196 - `std.range.zip` fails to compile if range elements aren't
default contructable

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

https://github.com/D-Programming-Language/phobos/commit/af32ce421480369733c2b62c17a00eb3689655fe
Merge pull request #1619 from denis-sh/fix-Issue-11196

Fix Issue 11196 - `std.range.zip` fails to compile if range elements aren't
default contructable

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Oct 08 2013
prev sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=11196


Denis Shelomovskij <verylonglogin.reg gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED


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