assume_aligned_msvc.hpp 505 B

12345678910111213141516171819
  1. /*
  2. Copyright 2015 NumScale SAS
  3. Copyright 2015 LRI UMR 8623 CNRS/University Paris Sud XI
  4. Copyright 2015 Glen Joseph Fernandes
  5. (glenjofe@gmail.com)
  6. Distributed under the Boost Software License, Version 1.0.
  7. (http://www.boost.org/LICENSE_1_0.txt)
  8. */
  9. #ifndef BOOST_ALIGN_DETAIL_ASSUME_ALIGNED_MSVC_HPP
  10. #define BOOST_ALIGN_DETAIL_ASSUME_ALIGNED_MSVC_HPP
  11. #include <cstddef>
  12. #define BOOST_ALIGN_ASSUME_ALIGNED(ptr, alignment) \
  13. __assume((reinterpret_cast<std::size_t>(ptr) & ((alignment) - 1)) == 0)
  14. #endif