From 11873949e0c418c1e72730e5a41dd32e7cf04b80 Mon Sep 17 00:00:00 2001 From: Richard Smith Date: Thu, 23 Mar 2017 23:32:03 +0000 Subject: [PATCH] Remove uses of std::binary_function, removed in C++17. llvm-svn: 298663 --- clang/include/clang/AST/TypeOrdering.h | 2 +- clang/include/clang/Basic/SourceLocation.h | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/clang/include/clang/AST/TypeOrdering.h b/clang/include/clang/AST/TypeOrdering.h index 392e544..fa64fae 100644 --- a/clang/include/clang/AST/TypeOrdering.h +++ b/clang/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/clang/include/clang/Basic/SourceLocation.h b/clang/include/clang/Basic/SourceLocation.h index 006cf3d..f0fe4c2 100644 --- a/clang/include/clang/Basic/SourceLocation.h +++ b/clang/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); } -- 2.7.4