MCPcopy Create free account
hub / github.com/cel-expr/cel-cpp / operator()

Method operator()

internal/message_equality.cc:252–265  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

250
251struct AnyEqualer {
252 bool operator()(EquatableAny lhs, EquatableAny rhs) const {
253 auto lhs_reflection =
254 well_known_types::GetAnyReflectionOrDie(lhs.get().GetDescriptor());
255 std::string lhs_type_url_scratch;
256 std::string lhs_value_scratch;
257 auto rhs_reflection =
258 well_known_types::GetAnyReflectionOrDie(rhs.get().GetDescriptor());
259 std::string rhs_type_url_scratch;
260 std::string rhs_value_scratch;
261 return lhs_reflection.GetTypeUrl(lhs.get(), lhs_type_url_scratch) ==
262 rhs_reflection.GetTypeUrl(rhs.get(), rhs_type_url_scratch) &&
263 lhs_reflection.GetValue(lhs.get(), lhs_value_scratch) ==
264 rhs_reflection.GetValue(rhs.get(), rhs_value_scratch);
265 }
266
267 template <typename T>
268 std::enable_if_t<std::negation_v<std::is_same<EquatableAny, T>>, bool>

Callers

nothing calls this directly

Calls 5

GetAnyReflectionOrDieFunction · 0.85
GetDescriptorMethod · 0.45
getMethod · 0.45
GetTypeUrlMethod · 0.45
GetValueMethod · 0.45

Tested by

no test coverage detected