Region.empty

Returns true iff the region is empty.

struct Region(Number, Tag, string tagAlias = null, Tag emptyTag = Tag.init)
bool
empty
pure const nothrow
(
)

Examples

1 alias R = Region!(int, int);
2 alias TI = R.TaggedInterval;
3 
4 R emptyRegion1;
5 auto emptyRegion2 = R([TI(0, 0, 0), TI(0, 10, 10)]);
6 auto emptyRegion3 = R([TI(0, 0, 0), TI(1, 0, 0)]);
7 auto region1 = R(0, 0, 10);
8 
9 assert(emptyRegion1.empty);
10 assert(emptyRegion2.empty);
11 assert(emptyRegion3.empty);
12 assert(!region1.empty);

Meta