You can use std::copy