Boost C++ Libraries

...one of the most highly regarded and expertly designed C++ library projects in the world. Herb Sutter and Andrei Alexandrescu, C++ Coding Standards

The MPL Reference Manual: list_c
Front Page / Sequences / Classes / list_c

list_c

Description

list_c is an Integral Sequence Wrapper for list. As such, it shares all list characteristics and requirements, and differs only in the way the original sequence content is specified.

Header

Sequence form Header
Variadic #include <boost/mpl/list_c.hpp>
Numbered #include n_c.hpp>

Expression semantics

The semantics of an expression are defined only where they differ from, or are not defined in list.

Expression Semantics
list_cc1,c2,... cn>
listn_cc1,c2,... cn>
A list of integral constant wrappers integral_cc1>, integral_cc2>, ... integral_ccn>; see Integral Sequence Wrapper.
list_cc1,c2,... cn>::type
listn_cc1,c2,... cn>::type
Identical to listn< integral_cc1>, integral_cc2>, ... integral_ccn> >; see Integral Sequence Wrapper.
list_cc1,c2,... cn>::value_type
listn_cc1,c2,... cn>::value_type
Identical to T; see Integral Sequence Wrapper.

Example

typedef list_c fibonacci;
typedef push_frontint_<1> >::type fibonacci2;

BOOST_MPL_ASSERT_RELATION( front::type::value, ==, 1 );