I think FORTRAN guarantees that a 1D array of complex numbers
is equivalent to a 1D array of real numbers twice as long.
The odd elements (remember FORTRAN arrays are 1-based) are real
and the even elements are imaginary.
I don't think C or C++ guarantee that a 1D array of complex numbers
is equivalent to a 1D array of real numbers twice as long.
The real and imaginary parts could be packed into the first part
of a struct with unused space behind them.
In practice, we don't expect that this will ever be a problem
for types float, double or long double but it might be a problem
on a few platforms for type complex<char> for example.
The only way around this potential problem is to specify
that a complex subscalar, subvector, submatrix or subtensor
is a view of 1D array of real numbers where the even elements
(remember C arrays are 0-based) are real and the odd elements are even.
This is convenient because it is possible to reference
the real and imaginary parts of a subscalar, subvector, submatrix
or subtensor separately. Bob Tisdale