From 2f124c3acb45f0b8997662fa2ba2291ff2b39a90 Mon Sep 17 00:00:00 2001 From: Christopher Kohlhoff Date: Wed, 7 Dec 2022 07:35:01 +1100 Subject: [PATCH] Add namespace qualifications to aligned_new and aligned_delete calls. These functions are defined in the asio namespace but are called from namespace asio_handler_alloc_helpers, hence the qualification is needed. --- include/boost/asio/detail/handler_alloc_helpers.hpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/include/boost/asio/detail/handler_alloc_helpers.hpp b/include/boost/asio/detail/handler_alloc_helpers.hpp index 5d127b70..d8b116f2 100644 --- a/include/boost/asio/detail/handler_alloc_helpers.hpp +++ b/include/boost/asio/detail/handler_alloc_helpers.hpp @@ -55,7 +55,7 @@ inline void* allocate(std::size_t s, Handler& h, std::size_t align = BOOST_ASIO_DEFAULT_ALIGN) { #if !defined(BOOST_ASIO_HAS_HANDLER_HOOKS) - return aligned_new(align, s); + return boost::asio::aligned_new(align, s); #elif defined(BOOST_ASIO_NO_DEPRECATED) // The asio_handler_allocate hook is no longer used to obtain memory. (void)&error_if_hooks_are_defined; @@ -65,7 +65,7 @@ inline void* allocate(std::size_t s, Handler& h, boost::asio::detail::thread_context::top_of_thread_call_stack(), s, align); # else // !defined(BOOST_ASIO_DISABLE_SMALL_BLOCK_RECYCLING) - return aligned_new(align, s); + return boost::asio::aligned_new(align, s); # endif // !defined(BOOST_ASIO_DISABLE_SMALL_BLOCK_RECYCLING) #else (void)align; @@ -78,7 +78,7 @@ template inline void deallocate(void* p, std::size_t s, Handler& h) { #if !defined(BOOST_ASIO_HAS_HANDLER_HOOKS) - aligned_delete(p); + boost::asio::aligned_delete(p); #elif defined(BOOST_ASIO_NO_DEPRECATED) // The asio_handler_allocate hook is no longer used to obtain memory. (void)&error_if_hooks_are_defined; @@ -88,7 +88,7 @@ inline void deallocate(void* p, std::size_t s, Handler& h) boost::asio::detail::thread_context::top_of_thread_call_stack(), p, s); #else // !defined(BOOST_ASIO_DISABLE_SMALL_BLOCK_RECYCLING) (void)s; - aligned_delete(p); + boost::asio::aligned_delete(p); #endif // !defined(BOOST_ASIO_DISABLE_SMALL_BLOCK_RECYCLING) #else using boost::asio::asio_handler_deallocate;