alignment_traits.qbk 716 B

123456789101112131415161718192021222324
  1. [/
  2. Copyright 2007 John Maddock.
  3. Distributed under the Boost Software License, Version 1.0.
  4. (See accompanying file LICENSE_1_0.txt or copy at
  5. http://www.boost.org/LICENSE_1_0.txt).
  6. ]
  7. [section:alignment Synthesizing Types with Specific Alignments]
  8. Some low level memory management routines need to synthesize a POD type with
  9. specific alignment properties. The template `__type_with_alignment` finds the smallest
  10. type with a specified alignment, while template `__aligned_storage` creates a type
  11. with a specific size and alignment.
  12. [*Synopsis]
  13. template <std::size_t Align>
  14. struct __type_with_alignment;
  15. template <std::size_t Size, std::size_t Align>
  16. struct __aligned_storage;
  17. [endsect]