| 191 | } |
| 192 | |
| 193 | absl::optional<Operator> Operator::FindByDisplayName(absl::string_view input) { |
| 194 | absl::call_once(operators_once_flag, InitializeOperators); |
| 195 | if (input.empty()) { |
| 196 | return absl::nullopt; |
| 197 | } |
| 198 | auto it = std::lower_bound(operators_by_display_name.cbegin(), |
| 199 | operators_by_display_name.cend(), input, |
| 200 | OperatorDataDisplayNameComparer{}); |
| 201 | if (it == operators_by_name.cend() || (*it)->display_name != input) { |
| 202 | return absl::nullopt; |
| 203 | } |
| 204 | return Operator(*it); |
| 205 | } |
| 206 | |
| 207 | absl::optional<UnaryOperator> UnaryOperator::FindByName( |
| 208 | absl::string_view input) { |
nothing calls this directly
no test coverage detected