diff --git a/include/etl/map.h b/include/etl/map.h index abad1aaf..4e3b4cfc 100644 --- a/include/etl/map.h +++ b/include/etl/map.h @@ -2859,7 +2859,9 @@ namespace etl template bool operator <(const etl::imap& lhs, const etl::imap& 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()); } //************************************************************************* diff --git a/include/etl/multimap.h b/include/etl/multimap.h index 1bb7235a..59f0d001 100644 --- a/include/etl/multimap.h +++ b/include/etl/multimap.h @@ -2506,7 +2506,9 @@ namespace etl template bool operator <(const etl::imultimap& lhs, const etl::imultimap& 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()); } //************************************************************************* diff --git a/include/etl/multiset.h b/include/etl/multiset.h index 46b3aa85..a44fe751 100644 --- a/include/etl/multiset.h +++ b/include/etl/multiset.h @@ -2486,10 +2486,9 @@ namespace etl template bool operator <(const etl::imultiset& lhs, const etl::imultiset& 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::value_compare()); } //************************************************************************* diff --git a/include/etl/set.h b/include/etl/set.h index ff8823c1..fa7d077a 100644 --- a/include/etl/set.h +++ b/include/etl/set.h @@ -2737,7 +2737,9 @@ namespace etl template bool operator <(const etl::iset& lhs, const etl::iset& 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::value_compare()); } //************************************************************************* diff --git a/test/test_map.cpp b/test/test_map.cpp index 776031a9..c2e4527c 100644 --- a/test/test_map.cpp +++ b/test/test_map.cpp @@ -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"));