| 91 | // Find index of the first element with the specified value known to be in the container. |
| 92 | template <typename Container, typename T> |
| 93 | size_t IndexOfElement(const Container& container, const T& value) { |
| 94 | auto it = std::find(container.begin(), container.end(), value); |
| 95 | DCHECK(it != container.end()); // Must exist. |
| 96 | return std::distance(container.begin(), it); |
| 97 | } |
| 98 | |
| 99 | // Remove the first element with the specified value known to be in the container. |
| 100 | template <typename Container, typename T> |