This site claims that set_union is equivalent to the following code: template <class InputIterator1, class InputIterator2, class OutputIterator>
I have a list of lists: lists = [[1,4,3,2,4], [4,5]] I want to flatten this list and remove all duplicates; or, in other words, apply a set union operation: