From 699b1e966d3f6124a4ad6fd7a528bbcc251d5a73 Mon Sep 17 00:00:00 2001 From: Jan Eisenhauer <44572464+JanEisenhauer@users.noreply.github.com> Date: Fri, 7 Jun 2019 11:55:15 +0200 Subject: [PATCH] With heterogeneous lookup, `equal_range` can result in a range with length greater than 1. --- include/boost/container/flat_map.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/boost/container/flat_map.hpp b/include/boost/container/flat_map.hpp index 2b52e14..7ef8c5f 100644 --- a/include/boost/container/flat_map.hpp +++ b/include/boost/container/flat_map.hpp @@ -1465,7 +1465,7 @@ class flat_map //! Complexity: Logarithmic. template BOOST_CONTAINER_FORCEINLINE std::pair equal_range(const K& x) - { return dtl::force_copy >(m_flat_tree.lower_bound_range(x)); } + { return dtl::force_copy >(m_flat_tree.equal_range(x)); } //! Requires: This overload is available only if //! key_compare::is_transparent exists. @@ -1475,7 +1475,7 @@ class flat_map //! Complexity: Logarithmic. template BOOST_CONTAINER_FORCEINLINE std::pair equal_range(const K& x) const - { return dtl::force_copy >(m_flat_tree.lower_bound_range(x)); } + { return dtl::force_copy >(m_flat_tree.equal_range(x)); } //! Effects: Extracts the internal sequence container. //!