[go: nahoru, domu]

Skip to content

Commit

Permalink
Remove usage of std::binary_function
Browse files Browse the repository at this point in the history
std::binary_function is removed in C++17 and the latest version of
libc++, and its presence is preventing Chrome from updating libc++.
  • Loading branch information
alanzhao1 committed Jun 27, 2022
1 parent a56be6f commit e2012f1
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions cpp/src/preload_supplier.cc
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
#include <algorithm>
#include <cassert>
#include <cstddef>
#include <functional>
#include <map>
#include <memory>
#include <set>
Expand All @@ -47,10 +46,9 @@ namespace {
// reader would consider to be "the same". The default implementation just does
// case insensitive string comparison, but StringCompare can be overridden with
// more sophisticated implementations.
class IndexLess : public std::binary_function<std::string, std::string, bool> {
class IndexLess {
public:
result_type operator()(const first_argument_type& a,
const second_argument_type& b) const {
bool operator()(const std::string& a, const std::string& b) const {
static const StringCompare kStringCompare;
return kStringCompare.NaturalLess(a, b);
}
Expand Down

0 comments on commit e2012f1

Please sign in to comment.