1 .. Sequences/Classes//vector_c |70
9 ``vector_c`` is an |Integral Sequence Wrapper| for |vector|. As such, it shares
10 all |vector| characteristics and requirements, and differs only in the way the
11 original sequence content is specified.
16 +-------------------+-----------------------------------------------------------+
17 | Sequence form | Header |
18 +===================+===========================================================+
19 | Variadic | ``#include <boost/mpl/vector_c.hpp>`` |
20 +-------------------+-----------------------------------------------------------+
21 | Numbered | ``#include <boost/mpl/vector/vector``\ *n*\ ``_c.hpp>`` |
22 +-------------------+-----------------------------------------------------------+
28 * |Integral Sequence Wrapper|
30 * |Random Access Sequence|
31 * |Extensible Sequence|
32 * |Back Extensible Sequence|
33 * |Front Extensible Sequence|
39 |Semantics disclaimer...| |vector|.
41 .. workaround substitution bug (should be replace:: vector\ *n*\ _c<T,\ |c1...cn|>)
42 .. |vectorn_c<T,...>| replace:: vector\ *n*\ _c<T,\ *c*\ :sub:`1`,\ *c*\ :sub:`2`,... \ *c*\ :sub:`n`\ >
44 +-------------------------------------------+-----------------------------------------------+
45 | Expression | Semantics |
46 +===========================================+===============================================+
47 | .. parsed-literal:: | A |vector| of integral constant wrappers |
48 | | ``integral_c<T,``\ |c1|\ ``>``, |
49 | vector_c<T,\ |c1...cn|> | ``integral_c<T,``\ |c2|\ ``>``, ... |
50 | |vectorn_c<T,...>| | ``integral_c<T,``\ |cn|\ ``>``; |
51 | | see |Integral Sequence Wrapper|. |
52 +-------------------------------------------+-----------------------------------------------+
53 | .. parsed-literal:: | Identical to ``vector``\ *n*\ ``<`` |
54 | | ``integral_c<T,``\ |c1|\ ``>``, |
55 | vector_c<T,\ |c1...cn|>::type | ``integral_c<T,``\ |c2|\ ``>``, ... |
56 | |vectorn_c<T,...>|::type | ``integral_c<T,``\ |cn|\ ``>`` ``>``; |
57 | | see |Integral Sequence Wrapper|. |
58 +-------------------------------------------+-----------------------------------------------+
59 | .. parsed-literal:: | Identical to ``T``; see |
60 | | |Integral Sequence Wrapper|. |
61 | vector_c<T,\ |c1...cn|>::value_type | |
62 | |vectorn_c<T,...>|::value_type | |
63 +-------------------------------------------+-----------------------------------------------+
71 typedef vector_c<int,1,1,2,3,5,8,13,21,34> fibonacci;
72 typedef push_back<fibonacci,int_<55> >::type fibonacci2;
74 BOOST_MPL_ASSERT_RELATION( front<fibonacci2>::type::value, ==, 1 );
75 BOOST_MPL_ASSERT_RELATION( back<fibonacci2>::type::value, ==, 55 );
81 |Sequences|, |Integral Sequence Wrapper|, |vector|, |integral_c|, |set_c|, |list_c|, |range_c|
84 .. copyright:: Copyright © 2001-2009 Aleksey Gurtovoy and David Abrahams
85 Distributed under the Boost Software License, Version 1.0. (See accompanying
86 file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)