I would like to know if there is any std library or boost tool to easily merge the contents of multiple sets into a single one.
In my case I have some sets of ints w
Looks like you are asking for std::set_union.
Example:
#include #include std::set s1; std::set s2; std::set s3; // Fill s1 and s2 std::set_union(std::begin(s1), std::end(s1), std::begin(s2), std::end(s2), std::inserter(s3, std::begin(s3))); // s3 now contains the union of s1 and s2