| 22 | |
| 23 | template <class vType> |
| 24 | int vectorIndexOf(const std::vector<vType>& v, const vType& o) { |
| 25 | auto itr = std::find(v.begin(), v.end(), o); |
| 26 | |
| 27 | if (itr != v.cend()) { |
| 28 | return (int)std::distance(v.begin(), itr); |
| 29 | } |
| 30 | return -1; |
| 31 | } |
| 32 | |
| 33 | #endif |
no test coverage detected