isAnyNeighbourhood

$(IS_ANY Neighbourhood)

template isAnyNeighbourhood (
T
) {
enum isAnyNeighbourhood;
enum isAnyNeighbourhood;
}

Examples

1 struct Foo {
2 	enum uint Dimension = 2;
3 
4 	int[Dimension][] getNeighboursCoordinates(int x, int y) {
5 		return [[x+1, y+1], [x+1, y], [x+1, y-1]];
6 	}
7 }
8 
9 static assert(!   isNeighbourhood!(Foo, 3));
10 static assert( isAnyNeighbourhood!(Foo   ));

Meta