| 1331 | namespace { |
| 1332 | |
| 1333 | std::unordered_multimap<std::string_view, int> CreateNameToIndexMap( |
| 1334 | const FieldVector& fields) { |
| 1335 | std::unordered_multimap<std::string_view, int> name_to_index; |
| 1336 | for (size_t i = 0; i < fields.size(); ++i) { |
| 1337 | name_to_index.emplace(fields[i]->name(), static_cast<int>(i)); |
| 1338 | } |
| 1339 | return name_to_index; |
| 1340 | } |
| 1341 | |
| 1342 | template <int NotFoundValue = -1, int DuplicateFoundValue = -1> |
| 1343 | int LookupNameIndex(const std::unordered_multimap<std::string_view, int>& name_to_index, |