I know the STL has set_difference, but I need to just know if 2 sets are disjoint. I’ve profiled my code and this is slowing my app down quite a bit. Is there an easy way to see if 2 sets are disjoint, or do I need to just roll my own code?
EDIT: I also tried set_intersection but it took the same time…
Modified hjhill’s code to reduce complexity by a factor of O(log n) by getting rid of the count() call.
I’ve complied and tested this code now so it should be good.