max_objects.hpp 567 B

123456789101112131415161718192021222324252627
  1. /*
  2. Copyright 2014 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_MAX_OBJECTS_HPP
  8. #define BOOST_ALIGN_DETAIL_MAX_OBJECTS_HPP
  9. #include <boost/align/detail/integral_constant.hpp>
  10. #include <cstddef>
  11. namespace boost {
  12. namespace alignment {
  13. namespace detail {
  14. template<class T>
  15. struct max_objects
  16. : integral_constant<std::size_t,
  17. ~static_cast<std::size_t>(0) / sizeof(T)> { };
  18. } /* detail */
  19. } /* alignment */
  20. } /* boost */
  21. #endif