[android] Fix colors order

Signed-off-by: Andrei Shkrob <github@shkrob.dev>
This commit is contained in:
Andrei Shkrob
2025-08-11 21:40:45 +02:00
committed by Konstantin Pastbin
parent 6c4503b0db
commit d0bb8c1c49
3 changed files with 40 additions and 4 deletions

View File

@@ -1,10 +1,11 @@
#pragma once
#include <algorithm>
#include <concepts>
#include <functional>
#include <initializer_list>
#include <iterator>
#include <memory>
#include <ranges>
#include <tuple>
#include <type_traits>
#include <vector>
@@ -496,4 +497,12 @@ struct RetrieveSecond
return pair.second;
}
};
template <std::ranges::random_access_range Container>
requires std::totally_ordered<std::ranges::range_value_t<Container>>
consteval bool HasUniqueElements(Container container)
{
std::sort(container.begin(), container.end());
return std::adjacent_find(container.begin(), container.end()) == container.end();
}
} // namespace base