From: Richard Smith Date: Thu, 23 Mar 2017 23:32:03 +0000 (+0000) Subject: Remove uses of std::binary_function, removed in C++17. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=50aa16bf3710aeb5f6d8ee0a8fa1ebfe475b203b;p=clang Remove uses of std::binary_function, removed in C++17. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@298663 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/clang/AST/TypeOrdering.h b/include/clang/AST/TypeOrdering.h index 392e544d90..fa64fae882 100644 --- a/include/clang/AST/TypeOrdering.h +++ b/include/clang/AST/TypeOrdering.h @@ -26,7 +26,7 @@ namespace clang { /// \brief Function object that provides a total ordering on QualType values. -struct QualTypeOrdering : std::binary_function { +struct QualTypeOrdering { bool operator()(QualType T1, QualType T2) const { return std::less()(T1.getAsOpaquePtr(), T2.getAsOpaquePtr()); } diff --git a/include/clang/Basic/SourceLocation.h b/include/clang/Basic/SourceLocation.h index 006cf3dc95..f0fe4c2706 100644 --- a/include/clang/Basic/SourceLocation.h +++ b/include/clang/Basic/SourceLocation.h @@ -321,8 +321,7 @@ public: } /// \brief Comparison function class, useful for sorting FullSourceLocs. - struct BeforeThanCompare : public std::binary_function { + struct BeforeThanCompare { bool operator()(const FullSourceLoc& lhs, const FullSourceLoc& rhs) const { return lhs.isBeforeInTranslationUnitThan(rhs); }