The Bentley-Ottoman algorithm finds all crossings in a set of line segments. For a well known and important algorithm, it seems quite weird that a C++ implementation of Bent
CGAL has an implementation of the Bently-Ottmann algorithm. You can find more about it in the 2D Sweep Line of Planar Curves section in the manual.