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