https://issues.dlang.org/show_bug.cgi?id=15738
Issue ID: 15738
Summary: Problem with std.experimental.ndslice empty()
Product: D
Version: D2
Hardware: x86_64
OS: Windows
Status: NEW
Severity: normal
Priority: P1
Component: phobos
Assignee: [email protected]
Reporter: [email protected]
This code asserts, but it's correct:
void main() {
import std.experimental.ndslice: sliced;
auto v = [1];
auto s1 = v[].sliced(1, 1);
auto s2 = s1[0 .. $, 0 .. 0];
assert(s2.empty);
}
If one (or more) coordinate has length zero, empty() must be true.
--