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

Function ShouldAcceptOverload

eval/eval/function_step.cc:49–58  ·  view source on GitHub ↗

Determine if the overload should be considered. Overloads that can consume errors or unknown sets must be allowed as a non-strict function.

Source from the content-addressed store, hash-verified

47// Determine if the overload should be considered. Overloads that can consume
48// errors or unknown sets must be allowed as a non-strict function.
49bool ShouldAcceptOverload(const cel::FunctionDescriptor& descriptor,
50 absl::Span<const cel::Value> arguments) {
51 for (size_t i = 0; i < arguments.size(); i++) {
52 if (arguments[i]->Is<cel::UnknownValue>() ||
53 arguments[i]->Is<cel::ErrorValue>()) {
54 return !descriptor.is_strict();
55 }
56 }
57 return true;
58}
59
60bool ArgumentKindsMatch(const cel::FunctionDescriptor& descriptor,
61 absl::Span<const cel::Value> arguments) {

Callers 2

DoEvaluateMethod · 0.85
EvaluateMethod · 0.85

Calls 2

is_strictMethod · 0.80
sizeMethod · 0.45

Tested by

no test coverage detected