use std::memcpy instead of std::copy (avoid checked iterators assertions)