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?

Thanks,
        Ralf

Andrei Alexandrescu's code is here:

http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/cctbx/cctbx/include/cctbx/array_family/

file alignment_calculator.h

__________________________________________________
Do You Yahoo!?
Yahoo! Movies - coverage of the 74th Academy Awards®
http://movies.yahoo.com/


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk