| 90 | // Value to native uwraps a CelValue to a native type. |
| 91 | template <typename T> |
| 92 | bool ValueToNative(CelValue value, T* result) { |
| 93 | if constexpr (std::is_same_v<T, CelValue>) { |
| 94 | *result = std::move(value); |
| 95 | return true; |
| 96 | } else { |
| 97 | return value.GetValue(result); |
| 98 | } |
| 99 | } |
| 100 | |
| 101 | // Native to value wraps a native return type to a CelValue. |
| 102 | absl::Status NativeToValue(bool value, ::google::protobuf::Arena*, CelValue* result) { |