1 .. Macros/Configuration//BOOST_MPL_LIMIT_MAP_SIZE |60
3 BOOST_MPL_LIMIT_MAP_SIZE
4 ========================
11 #if !defined(BOOST_MPL_LIMIT_MAP_SIZE)
12 # define BOOST_MPL_LIMIT_MAP_SIZE \\
21 ``BOOST_MPL_LIMIT_MAP_SIZE`` is an overridable configuration macro regulating
22 the maximum arity of the ``map``\ 's `variadic form`__. In this
23 implementation of the library, ``BOOST_MPL_LIMIT_MAP_SIZE`` has a default value
24 of 20. To override the default limit, define ``BOOST_MPL_LIMIT_MAP_SIZE`` to
25 the desired maximum arity rounded up to the nearest multiple of ten before
26 including any library header. |preprocessed headers disclaimer|
28 __ `Variadic Sequence`_
36 #define BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS
37 #define BOOST_MPL_LIMIT_MAP_SIZE 10
38 ``#``\ include <boost/mpl/map.hpp>
39 ``#``\ include <boost/mpl/pair.hpp>
40 ``#``\ include <boost/mpl/int.hpp>
42 using namespace boost::mpl;
44 template< int i > struct ints : pair< int_<i>,int_<i> > {};
46 typedef map< ints<1> > m_1;
47 typedef map< ints<1>, ints<2>, ints<3>, ints<4>, ints<5>
48 ints<6>, ints<7>, ints<8>, ints<9>, ints<10> > m_10;
50 // typedef map< ints<1>, ints<2>, ints<3>, ints<4>, ints<5>
51 // ints<6>, ints<7>, ints<8>, ints<9>, ints<10>, ints<11> > m_11; // error!
57 |Configuration|, |BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS|, |BOOST_MPL_LIMIT_SET_SIZE|
60 .. copyright:: Copyright © 2001-2009 Aleksey Gurtovoy and David Abrahams
61 Distributed under the Boost Software License, Version 1.0. (See accompanying
62 file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)