Boost logo

Boost :

From: Ralf W. Grosse-Kunstleve (rwgk_at_[hidden])
Date: 2002-03-27 11:39:28

Currently I am using code from Andrei Alexandrescu for computing
proper alignments for a fixed-capacity array type (see URL below).
Here is the hook that I am using (in auto_allocator.h):

  template <typename T, std::size_t N>
  union auto_allocator {
    char buffer[N * sizeof(T)];
    typename cctbx::af::alignment_calculator::AlignmentCalculator<
      CCTBX_AF_TYPELIST1(T)>::Result dummy_;

And then (in small_plain.h):
  detail::auto_allocator<ElementType, N> m_elems;

Could I use type_with_alignment to achieve the same?

Does type_with_alignment or any other code that I would need
for the auto_allocator depend on mpl?


Andrei Alexandrescu's code is here:

file alignment_calculator.h

Do You Yahoo!?
Yahoo! Movies - coverage of the 74th Academy Awards®

Boost list run by bdawes at, gregod at, cpdaniel at, john at