|
Boost : |
From: Aleksey Gurtovoy (agurtovoy_at_[hidden])
Date: 2004-07-06 03:52:36
zaufi writes:
> Hi all!
Hi Zaufi,
>
> I have a problem compiling the following simple program without defining
> BOOST_MPL_NO_PREPROCESSED_HEADERS. Though obviously there are
> preprocessed headers in boost/mpl/list/aux_/preprocessed/plain. The problem
> seems to be in compiler-specific preprocessed header (for example
> boost/mpl/aux_/preprocessed/gcc/list.hpp) where list is defined with 10
> arguments regardless of BOOST_MPL_LIMIT_LIST_SIZE value.
In short, it's this way by design. As you have found out,
BOOST_MPL_LIMIT_LIST_SIZE takes effect only if you disable preprocessed headers.
>
> ---{boost_list.cc} ---------------------------------------------
> // # define BOOST_MPL_NO_PREPROCESSED_HEADERS
> # if !defined(BOOST_MPL_LIMIT_LIST_SIZE) || (BOOST_MPL_LIMIT_LIST_SIZE < 20)
> # undef BOOST_MPL_LIMIT_LIST_SIZE
> # define BOOST_MPL_LIMIT_LIST_SIZE 20
> # endif
> #include <boost/mpl/list.hpp>
> typedef boost::mpl::list<
> int, int, int, int, int
> , int, int, int, int, int
> , int, int, int, int, int
> > my_list;
> int main()
> {
> my_list l;
> return 0;
> };
> ---------------------------------------{end of boost_list.cc}---
>
> any suggestions??
Use numbered list forms, e.g.:
#include <boost/mpl/list/list20.hpp>
typedef boost::mpl::list15<
int, int, int, int, int
, int, int, int, int, int
, int, int, int, int, int
> my_list;
int main()
{
my_list l;
return 0;
}
HTH,
-- Aleksey Gurtovoy MetaCommunications Engineering
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk