Sprout/sprout/index_tuple/index_tuple.hpp

29 lines
666 B
C++
Raw Normal View History

2012-04-04 13:59:02 +00:00
#ifndef SPROUT_INDEX_TUPLE_INDEX_TUPLE_HPP
#define SPROUT_INDEX_TUPLE_INDEX_TUPLE_HPP
#include <cstddef>
#include <sprout/config.hpp>
namespace sprout {
//
// index_t
//
typedef std::ptrdiff_t index_t;
//
// index_tuple
//
template<sprout::index_t... Indexes>
struct index_tuple {
public:
typedef index_tuple type;
2013-01-25 06:14:29 +00:00
typedef sprout::index_t value_type;
public:
SPROUT_STATIC_CONSTEXPR std::size_t size = sizeof...(Indexes);
2012-04-04 13:59:02 +00:00
};
2013-01-25 06:14:29 +00:00
template<sprout::index_t... Indexes>
SPROUT_CONSTEXPR_OR_CONST std::size_t sprout::index_tuple<Indexes...>::size;
2012-04-04 13:59:02 +00:00
} // namespace sprout
#endif // #ifndef SPROUT_INDEX_TUPLE_INDEX_TUPLE_HPP