1 .. Sequences/Classes//set_c |90
9 ``set_c`` is an |Integral Sequence Wrapper| for |set|. As such, it shares
10 all |set| 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/set_c.hpp>`` |
20 +-------------------+-------------------------------------------------------+
21 | Numbered | ``#include <boost/mpl/set/set``\ *n*\ ``_c.hpp>`` |
22 +-------------------+-------------------------------------------------------+
29 * |Associative Sequence|
30 * |Extensible Associative Sequence|
36 |Semantics disclaimer...| |set|.
38 .. workaround substitution bug (should be replace:: set\ *n*\ _c<T,\ |c1...cn|>)
39 .. |setn_c<T,...>| replace:: set\ *n*\ _c<T,\ *c*\ :sub:`1`,\ *c*\ :sub:`2`,... \ *c*\ :sub:`n`\ >
41 +---------------------------------------+-----------------------------------------------+
42 | Expression | Semantics |
43 +=======================================+===============================================+
44 | .. parsed-literal:: | A |set| of integral constant wrappers |
45 | | ``integral_c<T,``\ |c1|\ ``>``, |
46 | set_c<T,\ |c1...cn|> | ``integral_c<T,``\ |c2|\ ``>``, ... |
47 | |setn_c<T,...>| | ``integral_c<T,``\ |cn|\ ``>``; |
48 | | see |Integral Sequence Wrapper|. |
49 +---------------------------------------+-----------------------------------------------+
50 | .. parsed-literal:: | Identical to ``set``\ *n*\ ``<`` |
51 | | ``integral_c<T,``\ |c1|\ ``>``, |
52 | set_c<T,\ |c1...cn|>::type | ``integral_c<T,``\ |c2|\ ``>``, ... |
53 | |setn_c<T,...>|::type | ``integral_c<T,``\ |cn|\ ``>`` ``>``; |
54 | | see |Integral Sequence Wrapper|. |
55 +---------------------------------------+-----------------------------------------------+
56 | .. parsed-literal:: | Identical to ``T``; see |
57 | | |Integral Sequence Wrapper|. |
58 | set_c<T,\ |c1...cn|>::value_type | |
59 | |setn_c<T,...>|::value_type | |
60 +---------------------------------------+-----------------------------------------------+
68 typedef set_c< int,1,3,5,7,9 > odds;
70 BOOST_MPL_ASSERT_RELATION( size<odds>::value, ==, 5 );
71 BOOST_MPL_ASSERT_NOT(( empty<odds> ));
73 BOOST_MPL_ASSERT(( has_key< odds, integral_c<int,5> > ));
74 BOOST_MPL_ASSERT_NOT(( has_key< odds, integral_c<int,4> > ));
75 BOOST_MPL_ASSERT_NOT(( has_key< odds, integral_c<int,15> > ));
81 |Sequences|, |Integral Sequence Wrapper|, |set|, |integral_c|, |vector_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)