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

Method ValueToNative

eval/public/cel_function_adapter_impl.h:92–99  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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) {

Callers 3

EvaluateMethod · 0.80
EvaluateMethod · 0.80
RunWrapMethod · 0.80

Calls 1

GetValueMethod · 0.45

Tested by

no test coverage detected