Is there no function in the standard library like this?
set<T> set::union(set<T> other)
Or even this?
set<T> getUnion(set<T> a, set<T> b)
set_union
is the right function in name only. It can operate on vector
also, which means it may not be as efficient as a set
-only function.
I am not appending. Appending destroys the original set. I want a new set representing the union.