MCPcopy Create free account
hub / github.com/cel-expr/cel-cpp / MatchArguments

Method MatchArguments

eval/public/cel_function.cc:19–34  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

17using ::cel::interop_internal::ToLegacyValue;
18
19bool CelFunction::MatchArguments(absl::Span<const CelValue> arguments) const {
20 auto types_size = descriptor().types().size();
21
22 if (types_size != arguments.size()) {
23 return false;
24 }
25 for (size_t i = 0; i < types_size; i++) {
26 const auto& value = arguments[i];
27 CelValue::Type arg_type = descriptor().types()[i];
28 if (value.type() != arg_type && arg_type != CelValue::Type::kAny) {
29 return false;
30 }
31 }
32
33 return true;
34}
35
36bool CelFunction::MatchArguments(absl::Span<const cel::Value> arguments) const {
37 auto types_size = descriptor().types().size();

Callers

nothing calls this directly

Calls 3

typeMethod · 0.80
sizeMethod · 0.45
kindMethod · 0.45

Tested by

no test coverage detected