Changed memcpy used in list to std::copy