9 #ifndef LIBPMEMOBJ_CPP_INTEGER_SEQUENCE_HPP
10 #define LIBPMEMOBJ_CPP_INTEGER_SEQUENCE_HPP
23 template <
typename T, T...>
24 struct integer_sequence {
30 template <
size_t... Indices>
31 using index_sequence = integer_sequence<size_t, Indices...>;
38 template <
typename T, T I,
typename... Types>
39 struct make_integer_seq_impl;
44 template <
typename T, T I, T... Indices>
45 struct make_integer_seq_impl<T, I, integer_sequence<T, Indices...>> {
46 typedef integer_sequence<T, Indices...> type;
52 template <
typename N, N I, N... Indices,
typename T,
typename... Types>
53 struct make_integer_seq_impl<N, I, integer_sequence<N, Indices...>, T,
55 typedef typename make_integer_seq_impl<
56 N, I + 1, integer_sequence<N, Indices..., I>, Types...>::type
63 template <
typename... Types>
64 using make_index_sequence =
65 make_integer_seq_impl<size_t, 0, integer_sequence<size_t>, Types...>;
71 template <
class... Types>
72 using index_sequence_for =
typename make_index_sequence<Types...>::type;
Persistent memory namespace.
Definition: allocation_flag.hpp:15