aboutsummaryrefslogtreecommitdiff
path: root/graphics/vv/files/patch-common_clitkCommon.txx
diff options
context:
space:
mode:
Diffstat (limited to 'graphics/vv/files/patch-common_clitkCommon.txx')
-rw-r--r--graphics/vv/files/patch-common_clitkCommon.txx25
1 files changed, 25 insertions, 0 deletions
diff --git a/graphics/vv/files/patch-common_clitkCommon.txx b/graphics/vv/files/patch-common_clitkCommon.txx
new file mode 100644
index 000000000000..8f800d137543
--- /dev/null
+++ b/graphics/vv/files/patch-common_clitkCommon.txx
@@ -0,0 +1,25 @@
+Remove deprecated std::binary_function base class.
+
+C++17 removed std::binary_function which was deprecated in C++11.
+Replace with plain structs that define operator().
+
+--- common/clitkCommon.txx.orig 2025-04-17 12:54:38 UTC
++++ common/clitkCommon.txx
+@@ -135,7 +135,7 @@ template<class Type>
+
+ //--------------------------------------------------------------------
+ template<class Type>
+-struct vectorComparisonLowerThan: public std::binary_function<int, int, bool> {
++struct vectorComparisonLowerThan {
+ vectorComparisonLowerThan(const std::vector<Type> & v):vect(v) {};
+ bool operator()(int x, int y) {
+ return (vect[x] < vect[y]);
+@@ -146,7 +146,7 @@ template<class Type>
+
+ //--------------------------------------------------------------------
+ template<class Type>
+-struct vectorComparisonGreaterThan: public std::binary_function<int, int, bool> {
++struct vectorComparisonGreaterThan {
+ vectorComparisonGreaterThan(const std::vector<Type> & v):vect(v) {};
+ bool operator()(int x, int y) {
+ return (vect[x] > vect[y]);