In section 3.9.2 in document with draft of C++11:
(Document number N3242=11-0012, Date: 2011-02-28, Revises: N3225, Name: Working Draft, Standard for Programming Language C++) it have been said:
For any object (other than a base-class subobject) of "trivially copyable" type T, whether or not the object holds a valid value of type T, the underlying bytes (1.7) making up the object can be copied into an array of char or unsigned char.
I can not found any information about can I perform similar thing on objects with Standard Layout type.
Is it legal to make such operation on object with type, which is standard layout type?
Practically what I want todo that if
std::is_standard_layout<T>::value
is true then I (probably) can safely store object in auxiliary memory which is array of unsigned chars.
p.s. References
I know that due to policy of Stackoverlow user can be blocked but they are providing and links in the quesions, but here only for comfortable for reader. If links will be broken from 5 years please use another way to find mentioned documents.
[1] Drafts of C++ standards of The C++ Standards Committee - ISOCPP: http://www.open-std.org/jtc1/sc22/wg21/docs/standards
[2] Draft of C++2011 standard: http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2011/n3242.pdf