Cast expressions

The cast operator () is extended to support explicit type conversions from one vector data type to another vector data type. The exact same bit pattern is retained from the cast, and no conversion of the vector elements value takes place.

C++ static_cast is also extended to support type conversions between different vector types, just explicit cast operator ().

Casting between any scalar types and vector types are not allowed. To manipulate a vector element, the vector subscripting operator [], or the set of gather and scatter vector built-in functions should be used.

For more general information about casting, See Cast expression in z/OS XL C/C++ Language Reference.