From ff445c0ecedad0540be832102165ff9cc28ab53f Mon Sep 17 00:00:00 2001 From: Peter Dimov Date: Sun, 6 Nov 2016 14:38:13 +0200 Subject: [PATCH] Remove std::binary_function use, it has been removed in C++17 --- base_from_member_test.cpp | 1 - include/boost/utility/compare_pointees.hpp | 12 ++++++++++-- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/base_from_member_test.cpp b/base_from_member_test.cpp index 2598df5..815cc31 100644 --- a/base_from_member_test.cpp +++ b/base_from_member_test.cpp @@ -46,7 +46,6 @@ template < typename T > // A custom comparison type is needed struct object_id_compare - : std::binary_function { bool operator ()( object_id const &a, object_id const &b ) const; diff --git a/include/boost/utility/compare_pointees.hpp b/include/boost/utility/compare_pointees.hpp index 7e2515c..5ab21cd 100644 --- a/include/boost/utility/compare_pointees.hpp +++ b/include/boost/utility/compare_pointees.hpp @@ -33,8 +33,12 @@ bool equal_pointees ( OptionalPointee const& x, OptionalPointee const& y ) } template -struct equal_pointees_t : std::binary_function +struct equal_pointees_t { + typedef bool result_type; + typedef OptionalPointee first_argument_type; + typedef OptionalPointee second_argument_type; + bool operator() ( OptionalPointee const& x, OptionalPointee const& y ) const { return equal_pointees(x,y) ; } } ; @@ -56,8 +60,12 @@ bool less_pointees ( OptionalPointee const& x, OptionalPointee const& y ) } template -struct less_pointees_t : std::binary_function +struct less_pointees_t { + typedef bool result_type; + typedef OptionalPointee first_argument_type; + typedef OptionalPointee second_argument_type; + bool operator() ( OptionalPointee const& x, OptionalPointee const& y ) const { return less_pointees(x,y) ; } } ;