Insert Iterators Adapters in C++
December 6, 2020
Let’s slightly modify the example from The Move Iterator Adapter in C++ post:
#include <algorithm>
#include <list>
#include <string>
#include <vector>
/// @warning BUG! PLEASE, DON'T USE!
auto deep_copy_to_list(const std::vector<std::string>& src)
{
std::list<std::string> dst; // constructs the empty list
copy(cbegin(src), cend(src)…