A question for C++ experts...

Using memcpy/memmove with classes is valid as long as class meet requirements of is_trivially_copyable. (AFAIK some implementations of std::copy use it to choose most optimal way)
Like TriNityGER say, you can use move constructors/move assignment operators. Much safer option than pure memcpy.