diff --git a/src/server/search/doc_accessors.cc b/src/server/search/doc_accessors.cc index d82f7b8bfa16..009c4ec39510 100644 --- a/src/server/search/doc_accessors.cc +++ b/src/server/search/doc_accessors.cc @@ -81,8 +81,8 @@ FieldValue ExtractSortableValueFromJson(const search::Schema& schema, string_vie } /* Returns true if json elements were successfully processed. */ -template -bool ProcessJsonElements(const std::vector& json_elements, Callback&& cb) { +bool ProcessJsonElements(const std::vector& json_elements, + absl::FunctionRef cb) { auto process = [&cb](const auto& json_range) -> bool { for (const auto& json : json_range) { if (!json.is_null() && !cb(json)) {