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

Class ComparisonVisitor

eval/public/set_util.cc:114–127  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

112}
113
114struct ComparisonVisitor {
115 explicit ComparisonVisitor(CelValue rhs) : rhs(rhs) {}
116 template <typename T>
117 int operator()(T lhs_value) {
118 T rhs_value;
119 if (!rhs.GetValue(&rhs_value)) {
120 return ComparisonImpl(CelValue::Type(CelValue::IndexOf<T>::value),
121 rhs.type());
122 }
123 return ComparisonImpl(lhs_value, rhs_value);
124 }
125
126 CelValue rhs;
127};
128
129} // namespace
130

Callers 4

CelValueCompareFunction · 0.85
CelValueLessThanFunction · 0.85
CelValueEqualFunction · 0.85
CelValueGreaterThanFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected