Lodestar
An integrated real-time control package in C++
Indices.hpp
1
//
2
// Created by Hamza El-Kebir on 6/10/21.
3
//
4
5
#ifndef LODESTAR_INDICES_HPP
6
#define LODESTAR_INDICES_HPP
7
8
// C++11 implementation of std::integer_sequence (https://en.cppreference.com/w/cpp/utility/integer_sequence)
9
// See https://stackoverflow.com/a/7858971
10
template
<
int
...>
11
struct
IndexSequence
{
12
};
13
14
template
<
int
N,
int
...S>
15
struct
Indices
:
Indices
<N - 1, N - 1, S...> {
16
};
17
18
template
<
int
...S>
19
struct
Indices
<0, S...> {
20
typedef
IndexSequence
<S...>
type
;
21
};
22
23
#endif //LODESTAR_INDICES_HPP
Indices
Definition:
Indices.hpp:15
IndexSequence
Definition:
Indices.hpp:11
Lodestar
aux
Indices.hpp
Generated by
1.8.17