--- src/martinez.h.orig 2024-03-16 17:56:04 +++ src/martinez.h 2025-05-05 16:05:10 @@ -17,6 +17,7 @@ #include #include #include +#include using namespace std; @@ -37,7 +38,7 @@ enum PolygonType { SUBJECT, CLIPPING }; struct SweepEvent; - struct SegmentComp : public binary_function { // for sorting edges in the sweep line + struct SegmentComp : public std::function { // for sorting edges in the sweep line bool operator() (SweepEvent* e1, SweepEvent* e2) const; }; @@ -64,7 +65,7 @@ static void print (SweepEvent& e); // This function is intended for debugging purposes - struct SweepEventComp : public binary_function { // for sortening events + struct SweepEventComp : public std::function { // for sortening events bool operator() (SweepEvent* e1, SweepEvent* e2) const; }; --- src/polygon.cpp.orig 2024-03-16 17:56:04 +++ src/polygon.cpp 2025-05-05 16:04:51 @@ -12,6 +12,7 @@ #include #include #include +#include void Contour::boundingbox (Point& min, Point& max) { @@ -93,7 +94,7 @@ namespace { // start of anonymous namespace struct SweepEvent; - struct SegmentComp : public binary_function { + struct SegmentComp : public std::function { bool operator() (SweepEvent* e1, SweepEvent* e2) const; }; @@ -116,7 +117,7 @@ bool above (const Point& x) const { return !below (x); } }; - struct SweepEventComp : public binary_function { + struct SweepEventComp : public std::function { bool operator() (SweepEvent* e1, SweepEvent* e2) const { if (e1->p.x < e2->p.x) // Different x coordinate return true;