3rdParty/boost/1.78.0/libs/mpl/doc/refmanual/limit-metafunction-arity.html
| Prev Next | Back Along | Up Home | Full TOC | Front Page / Macros / Configuration / BOOST_MPL_LIMIT_METAFUNCTION_ARITY |
#if !defined([BOOST\_MPL\_LIMIT\_METAFUNCTION\_ARITY](./limit-metafunction-arity.html))
# define[BOOST\_MPL\_LIMIT\_METAFUNCTION\_ARITY](./limit-metafunction-arity.html)\_implementation-defined integral constant_\
/**/
#endif
BOOST_MPL_LIMIT_METAFUNCTION_ARITY is an overridable configuration macro regulating the maximum supported arity of metafunctions and metafunction classes. In this implementation of the library, BOOST_MPL_LIMIT_METAFUNCTION_ARITY has a default value of 5. To override the default limit, define BOOST_MPL_LIMIT_METAFUNCTION_ARITY to the desired maximum arity before including any library header. [Note: Overriding will take effect only if the library is configured not to use preprocessed headers. See BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS for more information. — end note]
#define[BOOST\_MPL\_CFG\_NO\_PREPROCESSED\_HEADERS](./cfg-no-preprocessed-headers.html)#define[BOOST\_MPL\_LIMIT\_METAFUNCTION\_ARITY](./limit-metafunction-arity.html)2#include <boost/mpl/[apply](./apply.html).hpp>
using namespace boost::mpl;
template< typename T1, typename T2 > struct second
{
typedef T2 type;
};
template< typename T1, typename T2, typename T3 > struct third
{
typedef T3 type;
};
typedef[apply](./apply.html)< second<[\_1](./placeholders.html),_2_>,int,long >::type r1;
// typedef[apply](./apply.html)< third<[\_1](./placeholders.html),_2_,[\_3](./placeholders.html)>,int,long,float >::type r2; // error!
Macros, Configuration, BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS
| Prev Next | Back Along | Up Home | Full TOC |
Copyright © 2001-2009 Aleksey Gurtovoy and David Abrahams Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) |