diff --git a/asio/include/asio/any_completion_handler.hpp b/asio/include/asio/any_completion_handler.hpp index 3bf38dc806..1114a09c61 100644 --- a/asio/include/asio/any_completion_handler.hpp +++ b/asio/include/asio/any_completion_handler.hpp @@ -128,7 +128,7 @@ class any_completion_handler_impl : (get_associated_immediate_executor)(handler_, candidate)); } - void* allocate(std::size_t size, std::size_t align) const + void* allocate(std::size_t size, std::size_t align_size) const { typename std::allocator_traits< associated_allocator_t())); - std::size_t space = size + align - 1; + std::size_t space = size + align_size - 1; unsigned char* base = std::allocator_traits::allocate( alloc, space + sizeof(std::ptrdiff_t)); void* p = base; - if (detail::align(align, size, p, space)) + if (detail::align(align_size, size, p, space)) { std::ptrdiff_t off = static_cast(p) - base; std::memcpy(static_cast(p) + size, &off, sizeof(off));