Range-v3
Range algorithms, views, and actions for the Standard Library
Integer sequence

Description

Equivalent to C++14's std::integer_sequence

Typedefs

template<bool B>
using meta::bool_ = std::integral_constant< bool, B >
 An integral constant wrapper for bool.
 
template<char Ch>
using meta::char_ = std::integral_constant< char, Ch >
 An integral constant wrapper for char.
 
template<std::size_t... Is>
using meta::index_sequence = integer_sequence< std::size_t, Is... >
 A container for a sequence of compile-time integer constants of type std::size_t.
 
template<int I>
using meta::int_ = std::integral_constant< int, I >
 An integral constant wrapper for int.
 
template<typename T , T From, T To>
using meta::integer_range = _t< detail::coerce_indices_< T, From, make_index_sequence< detail::range_distance_(From, To)> >>
 Makes the integer sequence [From, To). More...
 
template<std::size_t N>
using meta::make_index_sequence = _t< detail::make_indices_< N, index_sequence< 0 >, detail::strategy_(1, N)> >
 Generate index_sequence containing integer constants [0,1,2,...,N-1]. More...
 
template<typename T , T N>
using meta::make_integer_sequence = _t< detail::coerce_indices_< T, 0, make_index_sequence< static_cast< std::size_t >(N)> >>
 Generate integer_sequence containing integer constants [0,1,2,...,N-1]. More...
 
template<std::size_t N>
using meta::size_t = std::integral_constant< std::size_t, N >
 An integral constant wrapper for std::size_t.
 

Functions

template<char... Chs>
constexpr fold< list< char_< Chs >... >, meta::size_t< 0 >, quote< detail::atoi_ > > meta::operator""_z ()
 A user-defined literal that generates objects of type meta::size_t.
 

Typedef Documentation

◆ integer_range

template<typename T , T From, T To>
using meta::integer_range = typedef _t<detail::coerce_indices_<T, From, make_index_sequence<detail::range_distance_(From, To)> >>

#include <meta/meta.hpp>

Makes the integer sequence [From, To).

Complexity
$ O(log(To - From)) $.

◆ make_index_sequence

template<std::size_t N>
using meta::make_index_sequence = typedef _t<detail::make_indices_<N, index_sequence<0>, detail::strategy_(1, N)> >

#include <meta/meta.hpp>

Generate index_sequence containing integer constants [0,1,2,...,N-1].

Complexity
$ O(log(N)) $.

◆ make_integer_sequence

template<typename T , T N>
using meta::make_integer_sequence = typedef _t<detail::coerce_indices_<T, 0, make_index_sequence<static_cast<std::size_t>(N)> >>

#include <meta/meta.hpp>

Generate integer_sequence containing integer constants [0,1,2,...,N-1].

Complexity
$ O(log(N)) $.