ElementType

行列型の要素の型を取得します

template ElementType (
A
) if (
isMatrix!A ||
isAbstractMatrix!A
) {}

Examples

1 static struct S
2 {
3     enum rows = 1;
4     enum cols = 1;
5 
6     int opIndex(size_t, size_t) const
7     {
8         return 1;
9     }
10 
11     alias at = opIndex;
12 }
13 
14 static assert(is(ElementType!S == int));

Meta