diff --git a/common/strings/obfuscator.cc b/common/strings/obfuscator.cc index e9da8b6f3..7c8bf8b3b 100644 --- a/common/strings/obfuscator.cc +++ b/common/strings/obfuscator.cc @@ -17,6 +17,7 @@ #include #include "absl/status/status.h" +#include "absl/strings/str_cat.h" #include "absl/strings/str_split.h" #include "absl/strings/string_view.h" #include "common/util/logging.h" @@ -29,7 +30,8 @@ bool Obfuscator::encode(absl::string_view key, absl::string_view value) { absl::string_view Obfuscator::operator()(absl::string_view input) { if (decode_mode) { - const auto p = translator_.find_reverse(input); // hetergeneous lookup + // TODO(b/152331548): make hetergeneous lookup work on C++11 + const auto p = translator_.find_reverse(std::string(input)); return (p != nullptr) ? *p : input; } else { const std::string* str = translator_.insert_using_value_generator( diff --git a/common/util/bijective_map_test.cc b/common/util/bijective_map_test.cc index 8456bc860..8569aa63b 100644 --- a/common/util/bijective_map_test.cc +++ b/common/util/bijective_map_test.cc @@ -108,6 +108,7 @@ TEST(BijectiveMapTest, InsertRandom) { EXPECT_EQ(*ABSL_DIE_IF_NULL(m.insert_using_value_generator("f", gen)), 3); } +#if 0 // TODO(b/152331548): make work with C++11 // Testing heterogenous lookup: internally stored std::string, supporting // copy-less lookup with absl::string_view. using StringMapType = BijectiveMap