https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108342

--- Comment #3 from Rui Oliveira <ruilvo at ua dot pt> ---
(In reply to Andrew Pinski from comment #1)
> 
> I know about _Atomic and std::atomic but not std::complex and _Complex.
> Because std::complex was part of C++98 which was done before C99's _Complex
> ...

[complex.numbers.general] mentions:

If z is an lvalue of type cv complex<T> then: 
the expression reinterpret_­cast<cv T(&)[2]>(z) is well-formed,

https://eel.is/c++draft/complex.numbers.general

Basically stating that std::complex<T> is layouted exactly the same as T[2]. 

C standard says something similar iirc.

Reply via email to