diff options
Diffstat (limited to 'src/cpp/util/string_ref.cc')
-rw-r--r-- | src/cpp/util/string_ref.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/cpp/util/string_ref.cc b/src/cpp/util/string_ref.cc index eb54f65e3a..c42033f61f 100644 --- a/src/cpp/util/string_ref.cc +++ b/src/cpp/util/string_ref.cc @@ -36,6 +36,7 @@ #include <string.h> #include <algorithm> +#include <iostream> namespace grpc { @@ -80,7 +81,7 @@ size_t string_ref::find(string_ref s) const { } size_t string_ref::find(char c) const { - auto it = std::find_if(cbegin(), cend(), [c](char cc) { return cc == c; }); + auto it = std::find(cbegin(), cend(), c); return it == cend() ? npos : std::distance(cbegin(), it); } |