If an expression has a type of pointer to T, then a shape-operator can be used to specify the extent of that pointer. In other words, the shape-operator is used to reinterpret, as an n-dimensional array, the region of memory to which that expression points.
Formally, the syntax of the shape-operator is as follows:
shaped-expression := ([s1][s2]...[sn])cast-expression
The result of applying the shape-operator to an expression is an lvalue expression with an n-dimensional array type with dimensions s1 × s2 …× sn and element type T.
The precedence of the shape-operator is the same as a type cast.
Each si is an integral type expression that must evaluate to a positive integer.
Restrictions
Restrictions to the shape-operator are as follows:The type T must be a complete type.
The shape-operator can appear only in clauses for which it is explicitly allowed.
The result of a shape-operator must be a named array of a list item.
The type of the expression upon which a shape-operator is applied must be a pointer type.