diff --git a/asio/include/asio/detail/handler_alloc_helpers.hpp b/asio/include/asio/detail/handler_alloc_helpers.hpp index 77521b0b..c069f820 100644 --- a/asio/include/asio/detail/handler_alloc_helpers.hpp +++ b/asio/include/asio/detail/handler_alloc_helpers.hpp @@ -17,6 +17,10 @@ #include "asio/detail/push_options.hpp" +#include "asio/detail/push_options.hpp" +#include +#include "asio/detail/pop_options.hpp" + #include "asio/handler_alloc_hook.hpp" #include "asio/detail/noncopyable.hpp" @@ -28,13 +32,21 @@ namespace asio_handler_alloc_helpers { template inline void* allocate(std::size_t s, Handler* h) { +#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564)) + return ::operator new(s); +#else return asio_handler_allocate(s, h); +#endif } template inline void deallocate(void* p, Handler* h) { +#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564)) + ::operator delete(p); +#else asio_handler_deallocate(p, h); +#endif } } // namespace asio_handler_alloc_helpers