如何将键值对引用从一个映射复制到另一个相同类型的映射?

How do I copy key value pair references from one map to another map of the same type?

我在 C++ 中有两个类型为 std::map < std::string , std::vector < std::set< std::string>::iterator>> 的映射。

  1. catalog
  2. duplicatesCatalog

我想在目录中迭代器向量的大小大于 2 的情况下将 catalog(key,value) 的元素引用插入 duplicatesCatalog

我该怎么做?

duplicatesCatalog的参数使用std::reference_wrapper