Merge branch 'pull-request/#1245-Fix-discrepancy-with-STL-in-max_element-and-minmax_element' into development

This commit is contained in:
John Wellbelove 2025-12-23 07:35:26 +00:00
commit 16b7183eb8
2 changed files with 3 additions and 3 deletions

View File

@ -1528,7 +1528,7 @@ namespace etl
while (begin != end)
{
if (!compare(*begin, *maximum))
if (compare(*maximum, *begin))
{
maximum = begin;
}
@ -1582,7 +1582,7 @@ namespace etl
minimum = begin;
}
if (compare(*maximum, *begin))
if (!compare(*begin, *maximum))
{
maximum = begin;
}

View File

@ -53,7 +53,7 @@ namespace
std::mt19937 urng(rng());
using Vector = std::vector<int>;
Vector data = { 2, 1, 4, 3, 6, 5, 8, 7, 10, 9 };
Vector data = { 2, 1, 1, 4, 3, 6, 5, 8, 7, 10, 10, 9 };
using VectorM = std::vector<ItemM>;