////
Copyright 2024 Peter Dimov
Distributed under the Boost Software License, Version 1.0.
https://www.boost.org/LICENSE_1_0.txt
////

[#integer_sequence]
# <boost/compat/integer_sequence.hpp>
:idprefix: ref_integer_sequence_

## Description

The header `<boost/compat/integer_sequence.hpp>` implements the {cpp}14 utilities
`std::integer_sequence`, `std::index_sequence`, `std::make_integer_sequence`,
`std::make_index_sequence`, and `std::index_sequence_for`.

## Synopsis

```
namespace boost
{
namespace compat
{

template<class T, T... I> struct integer_sequence;

template<class T, T N> using make_integer_sequence = /*...*/;

template<std::size_t... I> using index_sequence = /*...*/;

template<std::size_t N> using make_index_sequence = /*...*/;

template<class... T> using index_sequence_for = /*...*/;

} // namespace compat
} // namespace boost
```

## integer_sequence

```
template<class T, T... I> struct integer_sequence {};
```

## make_integer_sequence

```
template<class T, T N> using make_integer_sequence = /*...*/;
```

`make_integer_sequence<T, N>` is an alias for `integer_sequence<T, 0, 1, 2, ..., N-1>`.

## index_sequence

```
template<std::size_t... I> using index_sequence = integer_sequence<std::size_t, I...>;
```

## make_index_sequence

```
template<std::size_t N> using make_index_sequence = make_integer_sequence<std::size_t, N>;
```

## index_sequence_for

```
template<class... T> using index_sequence_for = make_integer_sequence<std::size_t, sizeof...(T)>;
```
