use std::back_inserter for appending items via std::copy.