1
0
forked from boostorg/mp11
Files
boost_mp11/doc/mp11/integer_sequence.qbk

46 lines
1.5 KiB
Plaintext
Raw Normal View History

2017-03-16 19:45:47 +02:00
[/
/ Copyright 2017 Peter Dimov
/
/ Distributed under the Boost Software License, Version 1.0. (See
/ accompanying file LICENSE_1_0.txt or copy at
/ http://www.boost.org/LICENSE_1_0.txt)
/]
[section:integer_sequence Integer Sequences, `<boost/integer_sequence.hpp>`]
The contents of this header are defined in namespace `boost`.
[section `integer_sequence<T, I...>`]
template<class T, T... I> struct integer_sequence
{
};
`integer_sequence<T, I...>` holds a sequence of integers of type `T`. Same as C++14's `std::integer_sequence`.
[endsect]
[section `make_integer_sequence<T, N>`]
template<class T, T N> using make_integer_sequence = /*...*/;
`make_integer_sequence<T, N>` is `integer_sequence<T, 0, 1, ..., N-1>`. Same as C++14's `std::make_integer_sequence`.
[endsect]
[section `index_sequence<I...>`]
template<std::size_t... I> using index_sequence = integer_sequence<std::size_t, I...>;
`index_sequence<I...>` is an alias for `integer_sequence<size_t, I...>`. Same as C++14's `std::index_sequence`.
[endsect]
[section `make_index_sequence<N>`]
template<std::size_t N> using make_index_sequence = make_integer_sequence<std::size_t, N>;
`make_index_sequence<N>` is `index_sequence<0, 1, ..., N-1>`. Same as C++14's `std::make_index_sequence`.
[endsect]
[section `index_sequence_for<T...>`]
template<class... T> using index_sequence_for = make_integer_sequence<std::size_t, sizeof...(T)>;
`index_sequence_for<N>` is `make_index_sequence<sizeof...(T)>`. Same as C++14's `std::index_sequence_for`.
[endsect]
[endsect:integer_sequence]