Back to Arangodb

Variadic Sequence

3rdParty/boost/1.78.0/libs/mpl/doc/refmanual/variadic-sequence.html

3.12.9.13.0 KB
Original Source

| Prev Next | Back Along | Up Home | Full TOC | Front Page / Sequences / Concepts / Variadic Sequence |

Variadic Sequence

Description

A Variadic Sequence is a member of a family of sequence classes with both variadic and numbered forms. If seq is a generic name for some Variadic Sequence, its variadic form allows us to specify a sequence of n elements _t_1,_t_2,... _t_n, for any n from 0 up to a preprocessor-configurable limit BOOST_MPL_LIMIT_seq_SIZE, using the following notation:

seq<_t_1,_t_2,... _t_n>

By contrast, each numbered sequence form accepts the exact number of elements that is encoded in the name of the corresponding class template:

seq_n_<_t_1,_t_2,... _t_n>

For numbered forms, there is no predefined top limit for n, aside from compiler limitations on the number of template parameters.

Expression requirements

In the following table and subsequent specifications, seq is a placeholder token for the actual Variadic Sequence name.

ExpressionTypeComplexity
seq<_t_1,_t_2,... _t_n>Forward SequenceAmortized constant time
seq<_t_1,_t_2,... _t_n>::typeForward SequenceAmortized constant time
seq_n_<_t_1,_t_2,... _t_n>Forward SequenceAmortized constant time
seq_n_<_t_1,_t_2,... _t_n>::typeForward SequenceAmortized constant time

Expression semantics

typedef seq<_t_1,_t_2,..._t_n> s;
typedef seq_n_<_t_1,_t_2,..._t_n> s;

| Semantics: | s is a sequence of elements _t_1,_t_2,... _t_n. | | Postcondition: | size<s>::value == n. |

typedef seq<_t_1,_t_2,..._t_n>::type s;
typedef seq_n_<_t_1,_t_2,..._t_n>::type s;

| Semantics: | s is identical to seq_n_<_t_1,_t_2,... _t_n >. | | Postcondition: | size<s>::value == n. |

Models

See also

Sequences, Configuration, Integral Sequence Wrapper

| Prev Next | Back Along | Up Home | Full TOC |

Copyright © 2001-2009 Aleksey Gurtovoy and David Abrahams 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) |