[Issue 11196] New: `std.range.zip` fails to compile if range elements aren't default contructable
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Tue Oct 8 06:07:05 PDT 2013
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 at gmail.com
ReportedBy: verylonglogin.reg at gmail.com
--- Comment #0 from Denis Shelomovskij <verylonglogin.reg at 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: -------
More information about the Digitalmars-d-bugs
mailing list