| 79 | |
| 80 | template <typename ToDo> |
| 81 | void ForEachByKey(Key k, ToDo && toDo) const |
| 82 | { |
| 83 | auto range = std::equal_range(m_elements.begin(), m_elements.end(), k, ElementComparator()); |
| 84 | for (; range.first != range.second; ++range.first) |
| 85 | if (toDo((*range.first).second) == base::ControlFlow::Break) |
| 86 | break; |
| 87 | } |
| 88 | |
| 89 | private: |
| 90 | using Element = std::pair<Key, Value>; |
no test coverage detected