This commit is contained in:
jeanlemotan
2024-07-02 18:06:33 +02:00
commit 8297b0b45f
157 changed files with 24865 additions and 0 deletions
+42
View File
@@ -0,0 +1,42 @@
#pragma once
#include "tl/detail/prologue.h"
#include <EASTL/algorithm.h>
#include <EASTL/sort.h>
namespace tl
{
//////////////////////////////////////////////////////////////////////////
template <typename Container>
void sort(Container& container) noexcept
{
eastl::sort(container.begin(), container.end());
}
//////////////////////////////////////////////////////////////////////////
template <typename Container, typename Compare>
void sort(Container& container, const Compare& compare) noexcept
{
eastl::sort(container.begin(), container.end(), compare);
}
//////////////////////////////////////////////////////////////////////////
template <typename Container>
void stable_sort(Container& container) noexcept
{
eastl::stable_sort(container.begin(), container.end());
}
//////////////////////////////////////////////////////////////////////////
template <typename Container, typename Compare>
void stable_sort(Container& container, const Compare& compare) noexcept
{
eastl::stable_sort(container.begin(), container.end(), compare);
}
//////////////////////////////////////////////////////////////////////////
}