28 template <
typename src_container,
typename dst_container>
30 const src_container& src, dst_container& trg)
32 trg.resize(src.size());
34 auto last = src.end();
35 auto target = trg.begin();
36 for (; i != last; ++i, ++target)
37 *target = static_cast<typename dst_container::value_type>(*i);
void copy_container_typecasting(const src_container &src, dst_container &trg)
Copy all the elements in a container (vector, deque, list) into a different one performing the approp...