boost_no_cxx11_alignas.ipp 844 B

123456789101112131415161718192021222324252627282930313233343536
  1. // (C) Copyright Andrey Semashev 2013
  2. // Use, modification and distribution are subject to the
  3. // Boost Software License, Version 1.0. (See accompanying file
  4. // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
  5. // See http://www.boost.org/libs/config for more information.
  6. // MACRO: BOOST_NO_CXX11_ALIGNAS
  7. // TITLE: C++11 alignas keyword.
  8. // DESCRIPTION: The compiler does not support the C++11 alignment specification with alignas keyword.
  9. namespace boost_no_cxx11_alignas {
  10. struct alignas(16) my_data1
  11. {
  12. char data[10];
  13. };
  14. struct alignas(double) my_data2
  15. {
  16. char data[16];
  17. };
  18. my_data1 dummy1[2];
  19. my_data2 dummy2;
  20. alignas(16) char dummy3[10];
  21. alignas(double) char dummy4[32];
  22. int test()
  23. {
  24. // TODO: Test that the data is actually aligned on platforms with uintptr_t
  25. return 0;
  26. }
  27. }