Template | Value |
alignof(T). | |
If T names an array type, an integer value representing
the number of dimensions of T; otherwise, 0. | |
If T is not an array type, or if it has rank less
than or equal to I, or if I is 0 and T
has type “array of unknown bound of U”, then
0; otherwise, the bound ([dcl.array]) of the dimension of
T, where indexing of I is zero-based |
// the following assertions hold: assert(rank_v<int> == 0); assert(rank_v<int[2]> == 1); assert(rank_v<int[][4]> == 2);— end example
// the following assertions hold: assert(extent_v<int> == 0); assert(extent_v<int[2]> == 2); assert(extent_v<int[2][4]> == 2); assert(extent_v<int[][4]> == 0); assert((extent_v<int, 1>) == 0); assert((extent_v<int[2], 1>) == 0); assert((extent_v<int[2][4], 1>) == 4); assert((extent_v<int[][4], 1>) == 4);— end example