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

Function ComplexEquality

runtime/standard/equality_functions.cc:311–325  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

309
310template <typename Type, typename Op>
311auto ComplexEquality(Op&& op) {
312 return [op = std::forward<Op>(op)](
313 const Type& t1, const Type& t2,
314 const google::protobuf::DescriptorPool* absl_nonnull descriptor_pool,
315 google::protobuf::MessageFactory* absl_nonnull message_factory,
316 google::protobuf::Arena* absl_nonnull arena) -> absl::StatusOr<Value> {
317 CEL_ASSIGN_OR_RETURN(absl::optional<bool> result,
318 op(t1, t2, descriptor_pool, message_factory, arena));
319 if (!result.has_value()) {
320 return ErrorValue(
321 cel::runtime_internal::CreateNoMatchingOverloadError(kEqual));
322 }
323 return BoolValue(*result);
324 };
325}
326
327template <typename Type, typename Op>
328auto ComplexInequality(Op&& op) {

Callers

nothing calls this directly

Calls 4

ErrorValueFunction · 0.85
BoolValueClass · 0.50
has_valueMethod · 0.45

Tested by

no test coverage detected