mirror of
https://codeberg.org/comaps/comaps
synced 2025-12-19 13:03:36 +00:00
[base] Updated IsSortedAndUnique function.
Signed-off-by: Viktor Govako <viktor.govako@gmail.com>
This commit is contained in:
committed by
Konstantin Pastbin
parent
b7b87f5530
commit
7b4862b442
@@ -304,6 +304,12 @@ bool IsSortedAndUnique(Iter beg, Iter end, Compare comp)
|
||||
return true;
|
||||
}
|
||||
|
||||
template <typename ContT>
|
||||
bool IsSortedAndUnique(ContT const & cont)
|
||||
{
|
||||
return IsSortedAndUnique(cont.begin(), cont.end(), std::less<>());
|
||||
}
|
||||
|
||||
template <typename Iter, typename Compare>
|
||||
Iter RemoveIfKeepValid(Iter beg, Iter end, Compare comp)
|
||||
{
|
||||
@@ -328,12 +334,6 @@ Iter RemoveIfKeepValid(Iter beg, Iter end, Compare comp)
|
||||
return end;
|
||||
}
|
||||
|
||||
template <typename Iter>
|
||||
bool IsSortedAndUnique(Iter beg, Iter end)
|
||||
{
|
||||
return IsSortedAndUnique(beg, end, std::less<typename std::iterator_traits<Iter>::value_type>());
|
||||
}
|
||||
|
||||
struct DeleteFunctor
|
||||
{
|
||||
template <typename T>
|
||||
|
||||
Reference in New Issue
Block a user