memcpy was called for non-trivially copyable types