54 std::set<KeyT, CompareT, AllocatorT> c1, std::set<KeyT, CompareT, AllocatorT> c2)
56 std::set<KeyT, CompareT, AllocatorT> intersect;
57 std::set_intersection(c1.begin(), c1.end(), c2.begin(), c2.end(), std::inserter(intersect, intersect.begin()));
70std::vector<KeyT, AllocatorT>
getCommonElements(std::vector<KeyT, AllocatorT> c1, std::vector<KeyT, AllocatorT> c2)
72 std::sort(c1.begin(), c1.end());
73 std::sort(c2.begin(), c2.end());
74 std::vector<KeyT, AllocatorT> intersect;
75 std::set_intersection(c1.begin(), c1.end(), c2.begin(), c2.end(), std::back_inserter(intersect));
std::set< KeyT, CompareT, AllocatorT > getCommonElements(std::set< KeyT, CompareT, AllocatorT > c1, std::set< KeyT, CompareT, AllocatorT > c2)
Assemble common elements of two sets.