| 131 | : CelFunction(CelFunctionDescriptor{name, false, {}}), count_(count) {} |
| 132 | |
| 133 | absl::Status Evaluate(absl::Span<const CelValue> args, CelValue* result, |
| 134 | google::protobuf::Arena* arena) const override { |
| 135 | if (!args.empty()) { |
| 136 | return absl::Status(absl::StatusCode::kInvalidArgument, |
| 137 | "Bad arguments number"); |
| 138 | } |
| 139 | (*count_)++; |
| 140 | *result = CelValue::CreateBool(true); |
| 141 | return absl::OkStatus(); |
| 142 | } |
| 143 | |
| 144 | int* count_; |
| 145 | }; |