From 8bf9868ec3e920d83824a4fbb2e29709b3b0690a Mon Sep 17 00:00:00 2001 From: Wiktor Garbacz Date: Thu, 19 Jan 2023 07:31:23 -0800 Subject: [PATCH] Protobuf doesn't directly support heterogeneous lookup with `absl::string_view` If the platform does not have `std::string_view` (i.e. `absl::string_view` is not an alias of `std::string_view`) the lookup will cause build failure. PiperOrigin-RevId: 503159858 Change-Id: Ide8229ae0219d1cb6f3b36aba26da8d53183bc4b --- sandboxed_api/sandbox2/mounts.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sandboxed_api/sandbox2/mounts.cc b/sandboxed_api/sandbox2/mounts.cc index 5106373..9ed91ec 100644 --- a/sandboxed_api/sandbox2/mounts.cc +++ b/sandboxed_api/sandbox2/mounts.cc @@ -196,7 +196,7 @@ absl::Status Mounts::Remove(absl::string_view path) { return absl::NotFoundError( absl::StrCat("File node is mounted at parent of: ", path)); } - auto it = curtree->mutable_entries()->find(part); + auto it = curtree->mutable_entries()->find(std::string(part)); if (it == curtree->mutable_entries()->end()) { return absl::NotFoundError( absl::StrCat("Path does not exist in mounts: ", path));