P99

◆ P99_VECTOR

#define P99_VECTOR (   T,
  NAME,
 
)    _Alignas(sizeof(T)*(N)) T NAME[N]

A wrapper for vector type extensions.

This implements a vector of N elements of type T. On platforms that support this directly such vectors then can be used twofold. They can be accessed as arrays through indexing with [] and they can be used with the standard operators such as +, * etc.

On platforms that don't support this type of extension this expands to an array declaration with special alignment properties. On such platforms such a "vector" can only be used for declarations of variables or function parameters, but not as types.

Remarks
argument 0 should correspond to a type that is not a VLA.
argument 1 must be an identifier
argument 2 must expand to a decimal number

Definition at line 1057 of file p99_compiler.h.