Add missing index_tuple.hpp header.
[luabind.git] / luabind / detail / index_tuple.hpp
blobfd8eb4e1ad95cb16e1bf079e5283d24bb16f592f
1 // Copyright Daniel Wallin 2010. Use, modification and distribution is
2 // subject to the Boost Software License, Version 1.0. (See accompanying
3 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
5 #ifndef LUABIND_DETAIL_INDEX_TUPLE_100629_HPP
6 # define LUABIND_DETAIL_INDEX_TUPLE_100629_HPP
8 namespace luabind { namespace detail {
10 template <int... N>
11 struct index_tuple
12 {};
14 template <int N, int I, class Indices>
15 struct make_index_tuple_aux;
17 template <int N, int I, int... Indices>
18 struct make_index_tuple_aux<N, I, index_tuple<Indices...> >
19 : make_index_tuple_aux<N - 1, I + 1, index_tuple<Indices..., I> >
20 {};
22 template <int I, int... Indices>
23 struct make_index_tuple_aux<0, I, index_tuple<Indices...> >
25 typedef index_tuple<Indices...> type;
28 template <int N>
29 struct make_index_tuple
30 : make_index_tuple_aux<N, 0, index_tuple<> >
31 {};
33 }} // namespace luabind::detail
35 #endif // LUABIND_DETAIL_INDEX_TUPLE_100629_HPP