1 #ifndef QPID_INLINEALLOCATOR_H
2 #define QPID_INLINEALLOCATOR_H
27 #include <boost/type_traits/type_with_alignment.hpp>
28 #include <boost/type_traits/alignment_of.hpp>
32 template <
typename RequestedType,
typename InlineType,
typename BaseAllocator,
size_t Max>
40 template <
class BaseAllocator,
size_t Max>
43 typedef typename BaseAllocator::pointer
pointer;
44 typedef typename BaseAllocator::size_type
size_type;
51 if (n <= Max && !allocated) {
53 return reinterpret_cast<value_type*
>(address());
75 static const size_t ALIGNMENT=boost::alignment_of<value_type>::value;
76 typedef typename boost::type_with_alignment<ALIGNMENT>::type Aligner;
89 template <
typename RequestedType,
typename InlineType,
typename BaseAllocator,
size_t Max>
91 typedef typename BaseAllocator::template rebind<RequestedType>::other
other;
94 template <
typename T,
typename BaseAllocator,
size_t Max>