From 0baa42f3280725f7dfee3d2f8e1f5e04267876ed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ion=20Gazta=C3=B1aga?= Date: Mon, 15 Jul 2024 12:52:35 +0200 Subject: [PATCH 1/2] Support different types in algo_pred_equal and algo_pred_less --- include/boost/intrusive/detail/algorithm.hpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/include/boost/intrusive/detail/algorithm.hpp b/include/boost/intrusive/detail/algorithm.hpp index d2421ff..f20c9d1 100644 --- a/include/boost/intrusive/detail/algorithm.hpp +++ b/include/boost/intrusive/detail/algorithm.hpp @@ -26,15 +26,15 @@ namespace intrusive { struct algo_pred_equal { - template - bool operator()(const T &x, const T &y) const + template + bool operator()(const T &x, const T2 &y) const { return x == y; } }; struct algo_pred_less { - template - bool operator()(const T &x, const T &y) const + template + bool operator()(const T &x, const T2 &y) const { return x < y; } }; @@ -49,10 +49,6 @@ bool algo_equal(InputIt1 first1, InputIt1 last1, InputIt2 first2, BinaryPredicat return true; } -template -bool algo_equal(InputIt1 first1, InputIt1 last1, InputIt2 first2) -{ return (algo_equal)(first1, last1, first2, algo_pred_equal()); } - template bool algo_equal(InputIt1 first1, InputIt1 last1, InputIt2 first2, InputIt2 last2, BinaryPredicate pred) { @@ -62,6 +58,10 @@ bool algo_equal(InputIt1 first1, InputIt1 last1, InputIt2 first2, InputIt2 last2 return first1 == last1 && first2 == last2; } +template +bool algo_equal(InputIt1 first1, InputIt1 last1, InputIt2 first2) +{ return (algo_equal)(first1, last1, first2, algo_pred_equal()); } + template bool algo_equal(InputIt1 first1, InputIt1 last1, InputIt2 first2, InputIt2 last2) { return (algo_equal)(first1, last1, first2, last2, algo_pred_equal()); } From b9b83bd9e691cde4f116d8a0bd4e09b91e70ce4f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ion=20Gazta=C3=B1aga?= Date: Thu, 18 Jul 2024 12:51:56 +0200 Subject: [PATCH 2/2] Fixes #86 ("Invalid UTF-8 character in comment") --- doc/intrusive.qbk | 7 +++++++ include/boost/intrusive/detail/hash.hpp | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/doc/intrusive.qbk b/doc/intrusive.qbk index 21b7bed..49c4401 100644 --- a/doc/intrusive.qbk +++ b/doc/intrusive.qbk @@ -3902,6 +3902,13 @@ to be inserted in intrusive containers are allocated using `std::vector` or `std [section:release_notes Release Notes] +[section:release_notes_boost_1_86_00 Boost 1.86 Release] + +* Fixed bugs: + * [@https://github.com/boostorg/intrusive/issues/86 GitHub #86: ['Invalid UTF-8 character in comment]] + +[endsect] + [section:release_notes_boost_1_85_00 Boost 1.85 Release] * Fixed bugs: diff --git a/include/boost/intrusive/detail/hash.hpp b/include/boost/intrusive/detail/hash.hpp index 3ddfa2c..a18aa3a 100644 --- a/include/boost/intrusive/detail/hash.hpp +++ b/include/boost/intrusive/detail/hash.hpp @@ -2,7 +2,7 @@ // // Copyright 2005-2014 Daniel James. // Copyright 2021, 2022 Peter Dimov. -// Copyright 2024 Ion Gaztaņaga. +// Copyright 2024 Ion Gaztanaga. // Distributed under the Boost Software License, Version 1.0. // https://www.boost.org/LICENSE_1_0.txt //