mirror of
https://github.com/ETLCPP/etl.git
synced 2026-04-30 19:09:10 +08:00
Merge branch 'pull-request/#1245-Fix-discrepancy-with-STL-in-max_element-and-minmax_element' into development
This commit is contained in:
commit
16b7183eb8
@ -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;
|
||||
}
|
||||
|
||||
@ -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>;
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user