forked from boostorg/algorithm
Remove all mentions of (unary|binary)_function; not needed and they have been removed for C++17
This commit is contained in:
@ -13,7 +13,6 @@
|
|||||||
#define BOOST_ALGORITHM_EQUAL_HPP
|
#define BOOST_ALGORITHM_EQUAL_HPP
|
||||||
|
|
||||||
#include <algorithm> // for std::equal
|
#include <algorithm> // for std::equal
|
||||||
#include <functional> // for std::binary_function
|
|
||||||
#include <iterator>
|
#include <iterator>
|
||||||
|
|
||||||
namespace boost { namespace algorithm {
|
namespace boost { namespace algorithm {
|
||||||
@ -21,7 +20,7 @@ namespace boost { namespace algorithm {
|
|||||||
namespace detail {
|
namespace detail {
|
||||||
|
|
||||||
template <class T1, class T2>
|
template <class T1, class T2>
|
||||||
struct eq : public std::binary_function<T1, T2, bool> {
|
struct eq {
|
||||||
bool operator () ( const T1& v1, const T2& v2 ) const { return v1 == v2 ;}
|
bool operator () ( const T1& v1, const T2& v2 ) const { return v1 == v2 ;}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -30,8 +30,10 @@ namespace boost {
|
|||||||
|
|
||||||
// a tolower functor
|
// a tolower functor
|
||||||
template<typename CharT>
|
template<typename CharT>
|
||||||
struct to_lowerF : public std::unary_function<CharT, CharT>
|
struct to_lowerF
|
||||||
{
|
{
|
||||||
|
typedef CharT argument_type;
|
||||||
|
typedef CharT result_type;
|
||||||
// Constructor
|
// Constructor
|
||||||
to_lowerF( const std::locale& Loc ) : m_Loc( &Loc ) {}
|
to_lowerF( const std::locale& Loc ) : m_Loc( &Loc ) {}
|
||||||
|
|
||||||
@ -50,8 +52,10 @@ namespace boost {
|
|||||||
|
|
||||||
// a toupper functor
|
// a toupper functor
|
||||||
template<typename CharT>
|
template<typename CharT>
|
||||||
struct to_upperF : public std::unary_function<CharT, CharT>
|
struct to_upperF
|
||||||
{
|
{
|
||||||
|
typedef CharT argument_type;
|
||||||
|
typedef CharT result_type;
|
||||||
// Constructor
|
// Constructor
|
||||||
to_upperF( const std::locale& Loc ) : m_Loc( &Loc ) {}
|
to_upperF( const std::locale& Loc ) : m_Loc( &Loc ) {}
|
||||||
|
|
||||||
|
@ -89,9 +89,10 @@ namespace boost {
|
|||||||
template<
|
template<
|
||||||
typename SeqT,
|
typename SeqT,
|
||||||
typename IteratorT=BOOST_STRING_TYPENAME SeqT::const_iterator >
|
typename IteratorT=BOOST_STRING_TYPENAME SeqT::const_iterator >
|
||||||
struct copy_iterator_rangeF :
|
struct copy_iterator_rangeF
|
||||||
public std::unary_function< iterator_range<IteratorT>, SeqT >
|
|
||||||
{
|
{
|
||||||
|
typedef iterator_range<IteratorT> argument_type;
|
||||||
|
typedef SeqT result_type;
|
||||||
SeqT operator()( const iterator_range<IteratorT>& Range ) const
|
SeqT operator()( const iterator_range<IteratorT>& Range ) const
|
||||||
{
|
{
|
||||||
return copy_range<SeqT>(Range);
|
return copy_range<SeqT>(Range);
|
||||||
|
@ -18,7 +18,7 @@
|
|||||||
#include <list>
|
#include <list>
|
||||||
|
|
||||||
template<typename T>
|
template<typename T>
|
||||||
struct is_ : public std::unary_function<T, bool> {
|
struct is_ {
|
||||||
is_ ( T v ) : val_ ( v ) {}
|
is_ ( T v ) : val_ ( v ) {}
|
||||||
~is_ () {}
|
~is_ () {}
|
||||||
bool operator () ( T comp ) const { return val_ == comp; }
|
bool operator () ( T comp ) const { return val_ == comp; }
|
||||||
|
@ -18,7 +18,7 @@
|
|||||||
#include <list>
|
#include <list>
|
||||||
|
|
||||||
template<typename T>
|
template<typename T>
|
||||||
struct is_ : public std::unary_function<T, bool> {
|
struct is_ {
|
||||||
is_ ( T v ) : val_ ( v ) {}
|
is_ ( T v ) : val_ ( v ) {}
|
||||||
~is_ () {}
|
~is_ () {}
|
||||||
bool operator () ( T comp ) const { return val_ == comp; }
|
bool operator () ( T comp ) const { return val_ == comp; }
|
||||||
|
@ -18,7 +18,7 @@
|
|||||||
#include <list>
|
#include <list>
|
||||||
|
|
||||||
template<typename T>
|
template<typename T>
|
||||||
struct is_ : public std::unary_function<T, bool> {
|
struct is_ {
|
||||||
is_ ( T v ) : val_ ( v ) {}
|
is_ ( T v ) : val_ ( v ) {}
|
||||||
~is_ () {}
|
~is_ () {}
|
||||||
bool operator () ( T comp ) const { return val_ == comp; }
|
bool operator () ( T comp ) const { return val_ == comp; }
|
||||||
|
@ -18,7 +18,7 @@
|
|||||||
#include <list>
|
#include <list>
|
||||||
|
|
||||||
template<typename T>
|
template<typename T>
|
||||||
struct is_ : public std::unary_function<T, bool> {
|
struct is_ {
|
||||||
is_ ( T v ) : val_ ( v ) {}
|
is_ ( T v ) : val_ ( v ) {}
|
||||||
~is_ () {}
|
~is_ () {}
|
||||||
bool operator () ( T comp ) const { return val_ == comp; }
|
bool operator () ( T comp ) const { return val_ == comp; }
|
||||||
|
Reference in New Issue
Block a user