From 7977bd0cdc4dd62cd928ea60ce9b670ba815a08a Mon Sep 17 00:00:00 2001 From: Marshall Clow Date: Sun, 20 Nov 2016 17:02:49 -0800 Subject: [PATCH] Remove all mentions of (unary|binary)_function; not needed and they have been removed for C++17 --- include/boost/algorithm/cxx14/equal.hpp | 3 +-- include/boost/algorithm/string/detail/case_conv.hpp | 8 ++++++-- include/boost/algorithm/string/detail/util.hpp | 5 +++-- test/all_of_test.cpp | 2 +- test/any_of_test.cpp | 2 +- test/none_of_test.cpp | 2 +- test/one_of_test.cpp | 2 +- 7 files changed, 14 insertions(+), 10 deletions(-) diff --git a/include/boost/algorithm/cxx14/equal.hpp b/include/boost/algorithm/cxx14/equal.hpp index f1539f8..9f97be1 100644 --- a/include/boost/algorithm/cxx14/equal.hpp +++ b/include/boost/algorithm/cxx14/equal.hpp @@ -13,7 +13,6 @@ #define BOOST_ALGORITHM_EQUAL_HPP #include // for std::equal -#include // for std::binary_function #include namespace boost { namespace algorithm { @@ -21,7 +20,7 @@ namespace boost { namespace algorithm { namespace detail { template - struct eq : public std::binary_function { + struct eq { bool operator () ( const T1& v1, const T2& v2 ) const { return v1 == v2 ;} }; diff --git a/include/boost/algorithm/string/detail/case_conv.hpp b/include/boost/algorithm/string/detail/case_conv.hpp index 42621c7..233912c 100644 --- a/include/boost/algorithm/string/detail/case_conv.hpp +++ b/include/boost/algorithm/string/detail/case_conv.hpp @@ -30,8 +30,10 @@ namespace boost { // a tolower functor template - struct to_lowerF : public std::unary_function + struct to_lowerF { + typedef CharT argument_type; + typedef CharT result_type; // Constructor to_lowerF( const std::locale& Loc ) : m_Loc( &Loc ) {} @@ -50,8 +52,10 @@ namespace boost { // a toupper functor template - struct to_upperF : public std::unary_function + struct to_upperF { + typedef CharT argument_type; + typedef CharT result_type; // Constructor to_upperF( const std::locale& Loc ) : m_Loc( &Loc ) {} diff --git a/include/boost/algorithm/string/detail/util.hpp b/include/boost/algorithm/string/detail/util.hpp index cf4a8b1..7844b67 100644 --- a/include/boost/algorithm/string/detail/util.hpp +++ b/include/boost/algorithm/string/detail/util.hpp @@ -89,9 +89,10 @@ namespace boost { template< typename SeqT, typename IteratorT=BOOST_STRING_TYPENAME SeqT::const_iterator > - struct copy_iterator_rangeF : - public std::unary_function< iterator_range, SeqT > + struct copy_iterator_rangeF { + typedef iterator_range argument_type; + typedef SeqT result_type; SeqT operator()( const iterator_range& Range ) const { return copy_range(Range); diff --git a/test/all_of_test.cpp b/test/all_of_test.cpp index 36918d5..b90eb27 100644 --- a/test/all_of_test.cpp +++ b/test/all_of_test.cpp @@ -18,7 +18,7 @@ #include template -struct is_ : public std::unary_function { +struct is_ { is_ ( T v ) : val_ ( v ) {} ~is_ () {} bool operator () ( T comp ) const { return val_ == comp; } diff --git a/test/any_of_test.cpp b/test/any_of_test.cpp index a3267c5..f576a3c 100644 --- a/test/any_of_test.cpp +++ b/test/any_of_test.cpp @@ -18,7 +18,7 @@ #include template -struct is_ : public std::unary_function { +struct is_ { is_ ( T v ) : val_ ( v ) {} ~is_ () {} bool operator () ( T comp ) const { return val_ == comp; } diff --git a/test/none_of_test.cpp b/test/none_of_test.cpp index fc74945..b9b40c6 100644 --- a/test/none_of_test.cpp +++ b/test/none_of_test.cpp @@ -18,7 +18,7 @@ #include template -struct is_ : public std::unary_function { +struct is_ { is_ ( T v ) : val_ ( v ) {} ~is_ () {} bool operator () ( T comp ) const { return val_ == comp; } diff --git a/test/one_of_test.cpp b/test/one_of_test.cpp index 9422881..ccc3a97 100644 --- a/test/one_of_test.cpp +++ b/test/one_of_test.cpp @@ -18,7 +18,7 @@ #include template -struct is_ : public std::unary_function { +struct is_ { is_ ( T v ) : val_ ( v ) {} ~is_ () {} bool operator () ( T comp ) const { return val_ == comp; }