| 632 | |
| 633 | template<typename T> |
| 634 | std::vector<const T*> ConstPtrInVectorWrapper(const std::vector<std::unique_ptr<T>>& input) { |
| 635 | std::vector<const T*> ret; |
| 636 | for (auto t = input.begin(); t !=input.end(); ++t) { |
| 637 | ret.push_back(t->get()); |
| 638 | } |
| 639 | return ret; |
| 640 | } |
| 641 | |
| 642 | template<typename T1, typename T2> |
| 643 | inline static void SortForPair(std::vector<T1>* keys, std::vector<T2>* values, size_t start, bool is_reverse = false) { |