assume_aligned_clang.hpp 486 B

123456789101112131415161718
  1. /*
  2. Copyright 2015 Glen Joseph Fernandes
  3. (glenjofe@gmail.com)
  4. Distributed under the Boost Software License, Version 1.0.
  5. (http://www.boost.org/LICENSE_1_0.txt)
  6. */
  7. #ifndef BOOST_ALIGN_DETAIL_ASSUME_ALIGNED_CLANG_HPP
  8. #define BOOST_ALIGN_DETAIL_ASSUME_ALIGNED_CLANG_HPP
  9. #if __has_builtin(__builtin_assume_aligned)
  10. #define BOOST_ALIGN_ASSUME_ALIGNED(p, n) \
  11. (p) = static_cast<__typeof__(p)>(__builtin_assume_aligned((p), (n)))
  12. #else
  13. #define BOOST_ALIGN_ASSUME_ALIGNED(p, n)
  14. #endif
  15. #endif