From 482c0cfe8322b6f4ba9e48c8ae9b827be5bdb35b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ion=20Gazta=C3=B1aga?= Date: Wed, 4 May 2022 22:55:51 +0200 Subject: [PATCH] Add pointer specialization for value_less --- include/boost/intrusive/detail/value_functors.hpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/include/boost/intrusive/detail/value_functors.hpp b/include/boost/intrusive/detail/value_functors.hpp index dced9b0..7e220eb 100644 --- a/include/boost/intrusive/detail/value_functors.hpp +++ b/include/boost/intrusive/detail/value_functors.hpp @@ -18,6 +18,8 @@ # pragma once #endif +#include + namespace boost { namespace intrusive { @@ -29,6 +31,14 @@ struct value_less { return a < b; } }; +//Functors for member algorithm defaults +template +struct value_less +{ + bool operator()(const T *a, const T* b) const + { return std::size_t(a) < std::size_t(b); } +}; + template struct value_equal {