diff --git a/src/server/json_family.cc b/src/server/json_family.cc index 39164ef1a38d..94371d24f4fd 100644 --- a/src/server/json_family.cc +++ b/src/server/json_family.cc @@ -319,9 +319,9 @@ bool JsonAreEquals(const JsonType& lhs, const JsonType& rhs) { } } -template -OpResult SetJson(const OpArgs& op_args, string_view key, - Callback parse_json_value) { +OpResult SetJson( + const OpArgs& op_args, string_view key, + absl::FunctionRef()> parse_json_value) { auto& db_slice = op_args.GetDbSlice(); auto op_res = db_slice.AddOrFind(op_args.db_cntx, key); 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)) {