Remove std::binary_function use, it has been removed in C++17

This commit is contained in:
Peter Dimov 2016-11-06 14:38:13 +02:00
parent b90a28f0e1
commit ff445c0ece
2 changed files with 10 additions and 3 deletions

View File

@ -46,7 +46,6 @@ template < typename T >
// A custom comparison type is needed
struct object_id_compare
: std::binary_function<object_id, object_id, bool>
{
bool operator ()( object_id const &a, object_id const &b ) const;

View File

@ -33,8 +33,12 @@ bool equal_pointees ( OptionalPointee const& x, OptionalPointee const& y )
}
template<class OptionalPointee>
struct equal_pointees_t : std::binary_function<OptionalPointee,OptionalPointee,bool>
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<class OptionalPointee>
struct less_pointees_t : std::binary_function<OptionalPointee,OptionalPointee,bool>
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) ; }
} ;