is_bounded_array.hpp 912 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. /*
  2. Copyright 2018 Glen Joseph Fernandes
  3. (glenjofe@gmail.com)
  4. Distributed under the Boost Software License,
  5. Version 1.0. (See accompanying file LICENSE_1_0.txt
  6. or copy at http://www.boost.org/LICENSE_1_0.txt)
  7. */
  8. #ifndef BOOST_TT_IS_BOUNDED_ARRAY_HPP_INCLUDED
  9. #define BOOST_TT_IS_BOUNDED_ARRAY_HPP_INCLUDED
  10. #include <boost/type_traits/integral_constant.hpp>
  11. #include <cstddef>
  12. namespace boost {
  13. template<class T>
  14. struct is_bounded_array
  15. : false_type { };
  16. #if !defined(BOOST_NO_ARRAY_TYPE_SPECIALIZATIONS)
  17. template<class T, std::size_t N>
  18. struct is_bounded_array<T[N]>
  19. : true_type { };
  20. template<class T, std::size_t N>
  21. struct is_bounded_array<const T[N]>
  22. : true_type { };
  23. template<class T, std::size_t N>
  24. struct is_bounded_array<volatile T[N]>
  25. : true_type { };
  26. template<class T, std::size_t N>
  27. struct is_bounded_array<const volatile T[N]>
  28. : true_type { };
  29. #endif
  30. } /* boost */
  31. #endif