mirror of
https://github.com/ETLCPP/etl.git
synced 2026-04-30 19:09:10 +08:00
Added value_compare to lexicographical_compare call
This commit is contained in:
parent
62ffe81c1f
commit
d458811c26
@ -2859,7 +2859,9 @@ namespace etl
|
||||
template <typename TKey, typename TMapped, typename TKeyCompare>
|
||||
bool operator <(const etl::imap<TKey, TMapped, TKeyCompare>& lhs, const etl::imap<TKey, TMapped, TKeyCompare>& rhs)
|
||||
{
|
||||
return etl::lexicographical_compare(lhs.begin(), lhs.end(), rhs.begin(), rhs.end());
|
||||
return etl::lexicographical_compare(lhs.begin(), lhs.end(),
|
||||
rhs.begin(), rhs.end(),
|
||||
lhs.value_comp());
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
|
||||
@ -2506,7 +2506,9 @@ namespace etl
|
||||
template <typename TKey, typename TMapped, typename TKeyCompare>
|
||||
bool operator <(const etl::imultimap<TKey, TMapped, TKeyCompare>& lhs, const etl::imultimap<TKey, TMapped, TKeyCompare>& rhs)
|
||||
{
|
||||
return etl::lexicographical_compare(lhs.begin(), lhs.end(), rhs.begin(), rhs.end());
|
||||
return etl::lexicographical_compare(lhs.begin(), lhs.end(),
|
||||
rhs.begin(), rhs.end(),
|
||||
lhs.value_comp());
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
|
||||
@ -2486,10 +2486,9 @@ namespace etl
|
||||
template <typename TKey, typename TCompare>
|
||||
bool operator <(const etl::imultiset<TKey, TCompare>& lhs, const etl::imultiset<TKey, TCompare>& rhs)
|
||||
{
|
||||
return ETL_OR_STD::lexicographical_compare(lhs.begin(),
|
||||
lhs.end(),
|
||||
rhs.begin(),
|
||||
rhs.end());
|
||||
return ETL_OR_STD::lexicographical_compare(lhs.begin(), lhs.end(),
|
||||
rhs.begin(), rhs.end(),
|
||||
etl::imultiset<TKey, TCompare>::value_compare());
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
|
||||
@ -2737,7 +2737,9 @@ namespace etl
|
||||
template <typename TKey, typename TCompare>
|
||||
bool operator <(const etl::iset<TKey, TCompare>& lhs, const etl::iset<TKey, TCompare>& rhs)
|
||||
{
|
||||
return etl::lexicographical_compare(lhs.begin(), lhs.end(), rhs.begin(), rhs.end());
|
||||
return etl::lexicographical_compare(lhs.begin(), lhs.end(),
|
||||
rhs.begin(), rhs.end(),
|
||||
etl::iset<TKey, TCompare>::value_compare());
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
|
||||
@ -501,8 +501,6 @@ namespace
|
||||
CMap compare_data(initial_data.begin(), initial_data.end());
|
||||
EMap data(initial_data.begin(), initial_data.end());
|
||||
|
||||
auto v = data.at("3");
|
||||
|
||||
CHECK(data.at(Key("0")) == compare_data.at("0"));
|
||||
CHECK(data.at(Key("1")) == compare_data.at("1"));
|
||||
CHECK(data.at(Key("2")) == compare_data.at("2"));
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user