Is memcpy of a trivially-copyable type construction or assignment?
Let's say you have an object of type T and a suitably-aligned memory buffer alignas(T) unsigned char[sizeof(T)] . If you use std::memcpy to copy from the object of type T to the unsigned char array, is that considered copy construction or copy-assignment? If a type is trivially-copyable but not standard-layout, it is conceivable that a class such as this: struct Meow { int x; protected: // different access-specifier means not standard-layout int y; }; could be implemented like this, because the compiler isn't forced into using standard-layout: struct Meow_internal { private: ptrdiff_t x_offset