-
Notifications
You must be signed in to change notification settings - Fork 107
Open
Description
The current implementation of xtl::xcomplex prevents to reinterpret_cast it into an array of the underlying value_type, like one can do with std::complex (see http://eel.is/c++draft/complex.numbers.general). This is because xtl::complex stores the real and imaginay parts as two double. Even if this is almost always possible to reinterpret cast such a structure into an array, it is undefined behavior according to the standard.
A fix would be to specialize the implementation of xtl::xcomplex when its template parameters are not references. This would be a backward compatible change since only the storage of the data would change, not the APIs.
Metadata
Metadata
Assignees
Labels
No labels