| Front Page / Sequences / Classes / set_c |
set_c is an Integral Sequence Wrapper for set. As such, it shares all set characteristics and requirements, and differs only in the way the original sequence content is specified.
| Sequence form | Header |
|---|---|
| Variadic | #include <boost/mpl/set_c.hpp> |
| Numbered | #include <boost/mpl/set/setn_c.hpp> |
The semantics of an expression are defined only where they differ from, or are not defined in set.
| Expression | Semantics |
|---|---|
set_c<T,c1,c2,... cn> setn_c<T,c1,c2,... cn> |
A set of integral constant wrappers integral_c<T,c1>, integral_c<T,c2>, ... integral_c<T,cn>; see Integral Sequence Wrapper. |
set_c<T,c1,c2,... cn>::type setn_c<T,c1,c2,... cn>::type |
Identical to setn< integral_c<T,c1>, integral_c<T,c2>, ... integral_c<T,cn> >; see Integral Sequence Wrapper. |
set_c<T,c1,c2,... cn>::value_type setn_c<T,c1,c2,... cn>::value_type |
Identical to T; see Integral Sequence Wrapper. |
typedef set_c< int,1,3,5,7,9 > odds; BOOST_MPL_ASSERT_RELATION( size<odds>::value, ==, 5 ); BOOST_MPL_ASSERT_NOT(( empty<odds> )); BOOST_MPL_ASSERT(( has_key< odds, integral_c<int,5> > )); BOOST_MPL_ASSERT_NOT(( has_key< odds, integral_c<int,4> > )); BOOST_MPL_ASSERT_NOT(( has_key< odds, integral_c<int,15> > ));