12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970 |
- #ifndef BOOST_MULTI_ARRAY_RANGE_LIST_HPP
- #define BOOST_MULTI_ARRAY_RANGE_LIST_HPP
- #include "boost/array.hpp"
- namespace boost {
- namespace detail {
- namespace multi_array {
- struct choose_range_list_n {
- template <typename T, std::size_t NumRanges>
- struct bind {
- typedef boost::array<T,NumRanges> type;
- };
- };
- struct choose_range_list_zero {
- template <typename T, std::size_t NumRanges>
- struct bind {
- typedef boost::array<T,1> type;
- };
- };
- template <std::size_t NumRanges>
- struct range_list_gen_helper {
- typedef choose_range_list_n choice;
- };
- template <>
- struct range_list_gen_helper<0> {
- typedef choose_range_list_zero choice;
- };
- template <typename T, std::size_t NumRanges>
- struct range_list_generator {
- private:
- typedef typename range_list_gen_helper<NumRanges>::choice Choice;
- public:
- typedef typename Choice::template bind<T,NumRanges>::type type;
- };
- }
- }
- }
- #endif
|