Files
swift-mirror/unittests/Basic/ImmutablePointerSetTests.cpp
Michael Gottesman 0612d886e9 Add a "hasEmptyIntersection" method to ImmutablePointerSet.
We do this by doing a traversal of our sorted lists in a similar manner as one
would when one is merging two such sets, i.e. one has two iterators and always
advances the iterator that has a value that is less than the other. If we ever
hit a situation where the two iterators equal, we must have a non-empty
intersection.

A unittest that exercises very basic functionality is provided as well.
2016-03-08 14:05:10 -08:00

4.2 KiB