[algs] Assert trivial copy assignable in stable_sort
This commit is contained in:
parent
9bb39423f5
commit
70a5cd53f6
|
@ -1156,6 +1156,9 @@ hb_qsort (void *base, size_t nel, size_t width,
|
|||
template <typename T, typename T2, typename T3 = int> static inline void
|
||||
hb_stable_sort (T *array, unsigned int len, int(*compar)(const T2 *, const T2 *), T3 *array2 = nullptr)
|
||||
{
|
||||
static_assert (hb_is_trivially_copy_assignable (T), "");
|
||||
static_assert (hb_is_trivially_copy_assignable (T3), "");
|
||||
|
||||
for (unsigned int i = 1; i < len; i++)
|
||||
{
|
||||
unsigned int j = i;
|
||||
|
|
Loading…
Reference in New Issue