Boost logo

Boost Users :

Subject: [Boost-users] std::set_intersection without results
From: Jens Müller (blog_at_[hidden])
Date: 2012-09-14 05:36:55


Hi everyone,

I'm trying to test whether two std::vector's intersect.

A straightforward way is to sort them, apply std::set_intersection and
test whether the result set is non-empty.

However, I don't need the result. Is there some algorithm in boost that
just _tests_ for intersection, i.e., stops when it has found one common
element?

Best regards,

Jens


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net