| 250 | |
| 251 | struct 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> |
nothing calls this directly
no test coverage detected