# pragma once
#endif
+#include <cstddef>
+
namespace boost {
namespace intrusive {
#else
//index_tuple
-template<int... Indexes>
+template<std::size_t... Indexes>
struct index_tuple{};
//build_number_seq
template<std::size_t Num, typename Tuple = index_tuple<> >
struct build_number_seq;
-template<std::size_t Num, int... Indexes>
+template<std::size_t Num, std::size_t... Indexes>
struct build_number_seq<Num, index_tuple<Indexes...> >
: build_number_seq<Num - 1, index_tuple<Indexes..., sizeof...(Indexes)> >
{};
-template<int... Indexes>
+template<std::size_t... Indexes>
struct build_number_seq<0, index_tuple<Indexes...> >
{ typedef index_tuple<Indexes...> type; };
template<class T>
struct invert_typelist;
-template<int I, typename Tuple>
+template<std::size_t I, typename Tuple>
struct typelist_element;
-template<int I, typename Head, typename... Tail>
+template<std::size_t I, typename Head, typename... Tail>
struct typelist_element<I, typelist<Head, Tail...> >
{
typedef typename typelist_element<I-1, typelist<Tail...> >::type type;
typedef Head type;
};
-template<int ...Ints, class ...Types>
+template<std::size_t ...Ints, class ...Types>
typelist<typename typelist_element<(sizeof...(Types) - 1) - Ints, typelist<Types...> >::type...>
inverted_typelist(index_tuple<Ints...>, typelist<Types...>)
{
struct invert_typelist_impl;
-template<class Typelist, int ...Ints>
+template<class Typelist, std::size_t ...Ints>
struct invert_typelist_impl< Typelist, index_tuple<Ints...> >
{
static const std::size_t last_idx = sizeof_typelist<Typelist>::value - 1;
<typename typelist_element<last_idx - Ints, Typelist>::type...> type;
};
-template<class Typelist, int Int>
+template<class Typelist, std::size_t Int>
struct invert_typelist_impl< Typelist, index_tuple<Int> >
{
typedef Typelist type;