diff options
| -rw-r--r-- | toolsrc/include/SortedVector.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/toolsrc/include/SortedVector.h b/toolsrc/include/SortedVector.h index aa4a40844..67e307409 100644 --- a/toolsrc/include/SortedVector.h +++ b/toolsrc/include/SortedVector.h @@ -13,6 +13,8 @@ namespace vcpkg using size_type = typename std::vector<T>::size_type; using iterator = typename std::vector<T>::const_iterator; + SortedVector() : m_data() {} + explicit SortedVector(std::vector<T> v) : m_data(std::move(v)) { if (!std::is_sorted(m_data.begin(), m_data.end())) @@ -20,6 +22,7 @@ namespace vcpkg std::sort(m_data.begin(), m_data.end()); } } + template <class Compare> SortedVector(std::vector<T> v, Compare comp) : m_data(std::move(v)) { |
