9 #ifndef LIBPMEMOBJ_CPP_INTEGER_SEQUENCE_HPP
10 #define LIBPMEMOBJ_CPP_INTEGER_SEQUENCE_HPP
13 #include <type_traits>
24 template <
typename T, T...>
25 struct integer_sequence {
31 template <
size_t... Indices>
32 using index_sequence = integer_sequence<size_t, Indices...>;
34 template <
typename T, T N,
typename Enable, T... I>
35 struct make_integer_seq_impl;
41 template <
typename T, T N, T... I>
42 struct make_integer_seq_impl<T, N, typename std::enable_if<N == 0>::type,
44 using type = integer_sequence<T, I...>;
50 template <
typename T, T N, T... I>
51 struct make_integer_seq_impl<T, N, typename std::enable_if<N != 0>::type,
53 using type =
typename make_integer_seq_impl<T, N - 1, void, N - 1,
60 template <
typename T, T N>
61 using make_integer_sequence =
typename make_integer_seq_impl<T, N, void>::type;
67 using make_index_sequence = make_integer_sequence<size_t, N>;
75 template <
class... Types>
76 using index_sequence_for = make_index_sequence<
sizeof...(Types)>;
Persistent memory namespace.
Definition: allocation_flag.hpp:15