Meta  0.1
A tiny metaprogramming library
Integer sequence

Description

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

Classes

struct  meta::integer_sequence< T, Is >
 A container for a sequence of compile-time integer constants. More...
 

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<class T , T from, T to>
using meta::integer_range = meta::_t< detail::offset_integer_sequence_< T, from, meta::make_integer_sequence< T, to-from >>>
 Makes the integer sequence [from, to).
 
template<std::size_t N>
using meta::make_index_sequence = make_integer_sequence< std::size_t, 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::make_integer_sequence_< T,(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::literals::operator""_z ()
 A user-defined literal that generates objects of type meta::size_t.
 

Typedef Documentation

template<std::size_t N>
using meta::make_index_sequence = typedef make_integer_sequence<std::size_t, N>

#include <meta/meta.hpp>

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

Complexity
$ O(log(N)) $.

Definition at line 2959 of file meta.hpp.

template<typename T , T N>
using meta::make_integer_sequence = typedef _t<detail::make_integer_sequence_<T, (std::size_t)N>>

#include <meta/meta.hpp>

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

Complexity
$ O(log(N)) $.

Definition at line 2946 of file meta.hpp.