1.. Macros/Configuration//BOOST_MPL_LIMIT_METAFUNCTION_ARITY |20 2 3BOOST_MPL_LIMIT_METAFUNCTION_ARITY 4================================== 5 6Synopsis 7-------- 8 9.. parsed-literal:: 10 11 #if !defined(BOOST_MPL_LIMIT_METAFUNCTION_ARITY) 12 # define BOOST_MPL_LIMIT_METAFUNCTION_ARITY \\ 13 |idic| \\ 14 /\*\*/ 15 #endif 16 17 18Description 19----------- 20 21``BOOST_MPL_LIMIT_METAFUNCTION_ARITY`` is an overridable configuration macro 22regulating the maximum supported arity of `metafunctions`__ and 23`metafunction classes`__. In this implementation of the 24library, ``BOOST_MPL_LIMIT_METAFUNCTION_ARITY`` has a default value of 5. To 25override the default limit, define ``BOOST_MPL_LIMIT_METAFUNCTION_ARITY`` to 26the desired maximum arity before including any library header. 27|preprocessed headers disclaimer| 28 29__ `Metafunction`_ 30__ `Metafunction Class`_ 31 32 33Example 34------- 35 36.. parsed-literal:: 37 38 #define BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS 39 #define BOOST_MPL_LIMIT_METAFUNCTION_ARITY 2 40 ``#``\ include <boost/mpl/apply.hpp> 41 42 using namespace boost::mpl; 43 44 template< typename T1, typename T2 > struct second 45 { 46 typedef T2 type; 47 }; 48 49 template< typename T1, typename T2, typename T3 > struct third 50 { 51 typedef T3 type; 52 }; 53 54 typedef apply< second<_1,_2_>,int,long >::type r1; 55 // typedef apply< third<_1,_2_,_3>,int,long,float >::type r2; // error! 56 57 58See also 59-------- 60 61|Macros|, |Configuration|, |BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS| 62 63 64.. copyright:: Copyright � 2001-2009 Aleksey Gurtovoy and David Abrahams 65 Distributed under the Boost Software License, Version 1.0. (See accompanying 66 file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 67