Boost.Hana  1.5.0 Your standard library for metaprogramming
std::integer_sequence< T, v > Struct Template Reference

## Description

### template<typename T, T... v> struct std::integer_sequence< T, v >

Adaptation of std::integer_sequence for Hana.

## Modeled concepts

1. Comparable
Two std::integer_sequences are equal if and only if they have the same number of elements, and if corresponding elements compare equal. The types of the elements held in both integer_sequences may be different, as long as they can be compared.
#include <utility>
namespace hana = boost::hana;
int main() { }
2. Foldable
Folding an integer_sequence is equivalent to folding a sequence of std::integral_constants with the corresponding types.
#include <tuple>
#include <utility>
namespace hana = boost::hana;
auto add = [](auto a, auto b, auto c) { return a + b + c; };
int main() {
std::tuple<int, long, double> tuple{1, 2l, 3.3};
// the is are std::integral_constant<int, ...>s
});
}
3. Iterable
Iterating over an integer_sequence is equivalent to iterating over a sequence of the corresponding std::integral_constants.
#include <type_traits>
#include <utility>
namespace hana = boost::hana;
hana::at_c<2>(indices),
));
int main() { }
4. Searchable
Searching through an integer_sequence is equivalent to searching through the corresponding sequence of std::integral_constants.