Region.size

Returns the size of this region.

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

Examples

1 alias R = Region!(int, int);
2 alias TI = R.TaggedInterval;
3 
4 R emptyRegion;
5 auto region1 = R(0, 0, 10);
6 auto region2 = R([TI(0, 0, 10), TI(0, 20, 30)]);
7 auto region3 = R([TI(0, 0, 20), TI(0, 10, 30)]);
8 
9 assert(emptyRegion.size == 0);
10 assert(region1.size == 10);
11 assert(region2.size == 20);
12 assert(region3.size == 30);

Meta