Merge pull request #2093 from aria2/remove-deprecated-unary-binary-fun

Remove deprecated std::unary_function and std::binary_function
pull/2095/head
Tatsuhiro Tsujikawa 2023-09-16 16:50:14 +09:00 committed by GitHub
commit ef28a269ae
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 4 additions and 6 deletions

View File

@ -45,7 +45,7 @@
namespace aria2 { namespace aria2 {
class SizeFormatter : public std::unary_function<int64_t, std::string> { class SizeFormatter {
protected: protected:
virtual std::string format(int64_t size) const = 0; virtual std::string format(int64_t size) const = 0;

View File

@ -352,7 +352,7 @@ public:
} // namespace } // namespace
namespace { namespace {
class OrderByPathDepthDesc : public std::binary_function<Cookie, Cookie, bool> { class OrderByPathDepthDesc {
public: public:
bool operator()(const CookiePathDivider& lhs, bool operator()(const CookiePathDivider& lhs,
const CookiePathDivider& rhs) const const CookiePathDivider& rhs) const

View File

@ -102,8 +102,7 @@ void MetalinkEntry::reorderMetaurlsByPriority()
} }
namespace { namespace {
class Supported class Supported {
: public std::unary_function<std::shared_ptr<MetalinkResource>, bool> {
public: public:
bool operator()(const std::shared_ptr<MetalinkResource>& res) const bool operator()(const std::shared_ptr<MetalinkResource>& res) const
{ {

View File

@ -102,8 +102,7 @@ std::string strjoin(InputIterator first, InputIterator last,
return result; return result;
} }
template <typename T> template <typename T> class LeastRecentAccess {
class LeastRecentAccess : public std::binary_function<T, T, bool> {
public: public:
bool operator()(const std::shared_ptr<T>& lhs, bool operator()(const std::shared_ptr<T>& lhs,
const std::shared_ptr<T>& rhs) const const std::shared_ptr<T>& rhs) const