max_objects.hpp 563 B

1234567891011121314151617181920212223242526272829
  1. /*
  2. (c) 2014 Glen Joseph Fernandes
  3. <glenjofe -at- gmail.com>
  4. Distributed under the Boost Software
  5. License, Version 1.0.
  6. http://boost.org/LICENSE_1_0.txt
  7. */
  8. #ifndef BOOST_ALIGN_DETAIL_MAX_OBJECTS_HPP
  9. #define BOOST_ALIGN_DETAIL_MAX_OBJECTS_HPP
  10. #include <boost/align/detail/integral_constant.hpp>
  11. #include <cstddef>
  12. namespace boost {
  13. namespace alignment {
  14. namespace detail {
  15. template<class T>
  16. struct max_objects
  17. : integral_constant<std::size_t,
  18. ~static_cast<std::size_t>(0) / sizeof(T)> {
  19. };
  20. } /* .detail */
  21. } /* .alignment */
  22. } /* .boost */
  23. #endif