From d5b9a4eac0c27fa3977c5a797e64db6fb544b41d Mon Sep 17 00:00:00 2001 From: Tim Blechmann Date: Wed, 22 Dec 2021 22:57:32 +0800 Subject: [PATCH] list: fix `remove` / `remove_and_dispose` `value_equal` is a simple wrapper to `operator==`, but does not bind the argument to a predicate --- include/boost/intrusive/list.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/boost/intrusive/list.hpp b/include/boost/intrusive/list.hpp index 296997b..fbc4520 100644 --- a/include/boost/intrusive/list.hpp +++ b/include/boost/intrusive/list.hpp @@ -1117,7 +1117,7 @@ class list_impl //! Note: The relative order of elements that are not removed is unchanged, //! and iterators to elements that are not removed remain valid. void remove(const_reference value) BOOST_NOEXCEPT - { this->remove_if(value_equal(value)); } + { this->remove_if(detail::equal_to_value(value)); } //! Requires: Disposer::operator()(pointer) shouldn't throw. //! @@ -1132,7 +1132,7 @@ class list_impl //! and iterators to elements that are not removed remain valid. template void remove_and_dispose(const_reference value, Disposer disposer) BOOST_NOEXCEPT - { this->remove_and_dispose_if(value_equal(value), disposer); } + { this->remove_and_dispose_if(detail::equal_to_value(value), disposer); } //! Effects: Removes all the elements for which a specified //! predicate is satisfied. No destructors are called.