From cefc846e381b2fd14d81ddf31e4d28bf06377765 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ion=20Gazta=C3=B1aga?= Date: Tue, 20 Jan 2026 10:18:43 +0100 Subject: [PATCH] Remove unused and deprecated pointer hint parameter from "allocate", as compilers warn about it loudly. --- include/boost/interprocess/allocators/adaptive_pool.hpp | 2 +- .../interprocess/allocators/detail/allocator_common.hpp | 6 ++---- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/include/boost/interprocess/allocators/adaptive_pool.hpp b/include/boost/interprocess/allocators/adaptive_pool.hpp index 10dded6..3a8e0e0 100644 --- a/include/boost/interprocess/allocators/adaptive_pool.hpp +++ b/include/boost/interprocess/allocators/adaptive_pool.hpp @@ -415,7 +415,7 @@ class adaptive_pool //!Allocate memory for an array of count elements. //!Throws boost::interprocess::bad_alloc if there is no enough memory - pointer allocate(size_type count, cvoid_pointer hint = 0); + pointer allocate(size_type count); //!Deallocate allocated memory. //!Never throws diff --git a/include/boost/interprocess/allocators/detail/allocator_common.hpp b/include/boost/interprocess/allocators/detail/allocator_common.hpp index 54cbe5c..7ca7e25 100644 --- a/include/boost/interprocess/allocators/detail/allocator_common.hpp +++ b/include/boost/interprocess/allocators/detail/allocator_common.hpp @@ -533,9 +533,8 @@ class node_pool_allocation_impl //!Allocate memory for an array of count elements. //!Throws boost::interprocess::bad_alloc if there is no enough memory BOOST_INTERPROCESS_NODISCARD - pointer allocate(size_type count, cvoid_pointer hint = 0) + pointer allocate(size_type count) { - (void)hint; typedef typename node_pool<0>::type node_pool_t; node_pool_t *pool = node_pool<0>::get(this->derived()->get_node_pool()); if(size_overflows(count)){ @@ -728,9 +727,8 @@ class cached_allocator_impl //!Allocate memory for an array of count elements. //!Throws boost::interprocess::bad_alloc if there is no enough memory BOOST_INTERPROCESS_NODISCARD - pointer allocate(size_type count, cvoid_pointer hint = 0) + pointer allocate(size_type count) { - (void)hint; void * ret; if(size_overflows(count)){ throw bad_alloc();