<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">--- src/martinez.h.orig	2024-03-16 17:56:04
+++ src/martinez.h	2025-05-05 16:05:10
@@ -17,6 +17,7 @@
 #include &lt;queue&gt;
 #include &lt;vector&gt;
 #include &lt;set&gt;
+#include &lt;functional&gt;
 
 using namespace std;
 
@@ -37,7 +38,7 @@
 	enum PolygonType { SUBJECT, CLIPPING };
 
 	struct SweepEvent;
-	struct SegmentComp : public binary_function&lt;SweepEvent*, SweepEvent*, bool&gt; { // for sorting edges in the sweep line
+	struct SegmentComp : public std::function&lt;bool(SweepEvent*, SweepEvent*)&gt; { // for sorting edges in the sweep line
 		bool operator() (SweepEvent* e1, SweepEvent* e2) const;
 	};
 	
@@ -64,7 +65,7 @@
 	
 	static void print (SweepEvent&amp; e); // This function is intended for debugging purposes
 
-	struct SweepEventComp : public binary_function&lt;SweepEvent*, SweepEvent*, bool&gt; { // for sortening events
+	struct SweepEventComp : public std::function&lt;bool(SweepEvent*, SweepEvent*)&gt; { // 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 &lt;set&gt;
 #include &lt;cstdlib&gt;
 #include &lt;algorithm&gt;
+#include &lt;functional&gt;
 
 void Contour::boundingbox (Point&amp; min, Point&amp; max)
 {
@@ -93,7 +94,7 @@
 
 namespace { // start of anonymous namespace
 	struct SweepEvent;
-	struct SegmentComp : public binary_function&lt;SweepEvent*, SweepEvent*, bool&gt; {
+	struct SegmentComp : public std::function&lt;bool(SweepEvent*, SweepEvent*)&gt; {
 		bool operator() (SweepEvent* e1, SweepEvent* e2) const;
 	};
 
@@ -116,7 +117,7 @@
 		bool above (const Point&amp; x) const { return !below (x); }
 	};
 
-	struct SweepEventComp : public binary_function&lt;SweepEvent*, SweepEvent*, bool&gt; {
+	struct SweepEventComp : public std::function&lt;bool(SweepEvent*, SweepEvent*)&gt; {
 		bool operator() (SweepEvent* e1, SweepEvent* e2) const {
 			if (e1-&gt;p.x &lt; e2-&gt;p.x) // Different x coordinate
 				return true;
</pre></body></html>