1.. Sequences/Classes//set_c |90 2 3set_c 4===== 5 6Description 7----------- 8 9``set_c`` is an |Integral Sequence Wrapper| for |set|. As such, it shares 10all |set| characteristics and requirements, and differs only in the way the 11original sequence content is specified. 12 13Header 14------ 15 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+-------------------+-------------------------------------------------------+ 23 24 25Model of 26-------- 27 28* |Variadic Sequence| 29* |Associative Sequence| 30* |Extensible Associative Sequence| 31 32 33Expression semantics 34-------------------- 35 36|Semantics disclaimer...| |set|. 37 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`\ > 40 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+---------------------------------------+-----------------------------------------------+ 61 62 63Example 64------- 65 66.. parsed-literal:: 67 68 typedef set_c< int,1,3,5,7,9 > odds; 69 70 BOOST_MPL_ASSERT_RELATION( size<odds>::value, ==, 5 ); 71 BOOST_MPL_ASSERT_NOT(( empty<odds> )); 72 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> > )); 76 77 78See also 79-------- 80 81|Sequences|, |Integral Sequence Wrapper|, |set|, |integral_c|, |vector_c|, |list_c|, |range_c| 82 83 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) 87