10 #ifndef BOOST_BEAST_HANDLER_ALLOC_HPP 11 #define BOOST_BEAST_HANDLER_ALLOC_HPP 14 #include <boost/asio/handler_alloc_hook.hpp> 15 #include <boost/config.hpp> 19 #include <type_traits> 43 #if BOOST_BEAST_DOXYGEN 44 template<
class T,
class Handler>
47 template<
class T,
class Handler>
56 template<
class U,
class H>
105 auto const size = n *
sizeof(T);
106 using boost::asio::asio_handler_allocate;
108 asio_handler_allocate(size, std::addressof(h_)));
114 auto const size = n *
sizeof(T);
115 using boost::asio::asio_handler_deallocate;
116 asio_handler_deallocate(p, size, std::addressof(h_));
121 #if defined(BOOST_LIBSTDCXX_VERSION) && BOOST_LIBSTDCXX_VERSION < 60000 122 template<
class U,
class... Args>
124 construct(U* ptr, Args&&... args)
126 ::new((
void*)ptr) U(std::forward<Args>(args)...);
154 return ! (lhs == rhs);
handler_alloc< U, Handler > other
Definition: handler_alloc.hpp:74
Definition: handler_alloc.hpp:48
T const * const_pointer
Definition: handler_alloc.hpp:66
T const & const_reference
Definition: handler_alloc.hpp:67
Definition: async_result.hpp:20
friend bool operator!=(handler_alloc const &lhs, handler_alloc< U, Handler > const &rhs)
Definition: handler_alloc.hpp:150
Definition: handler_alloc.hpp:72
std::size_t size_type
Definition: handler_alloc.hpp:68
std::true_type is_always_equal
Definition: handler_alloc.hpp:63
handler_alloc(handler_alloc< U, Handler > const &other)
Copy constructor.
Definition: handler_alloc.hpp:96
value_type * allocate(size_type n)
Definition: handler_alloc.hpp:103
void deallocate(value_type *p, size_type n)
Definition: handler_alloc.hpp:112
T * pointer
Definition: handler_alloc.hpp:64
friend bool operator==(handler_alloc const &, handler_alloc< U, Handler > const &)
Definition: handler_alloc.hpp:140
handler_alloc(Handler &h)
Definition: handler_alloc.hpp:89
handler_alloc & operator=(handler_alloc &&)=default
std::ptrdiff_t difference_type
Definition: handler_alloc.hpp:69
T value_type
Definition: handler_alloc.hpp:62
T & reference
Definition: handler_alloc.hpp:65