2004-11-28 03:35:12 +00:00
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
< html xmlns = "http://www.w3.org/1999/xhtml" xml:lang = "en" lang = "en" >
< head >
< meta http-equiv = "Content-Type" content = "text/html; charset=utf-8" />
2010-08-09 20:07:24 +00:00
< meta name = "generator" content = "Docutils 0.7: http://docutils.sourceforge.net/" />
2004-11-28 03:35:12 +00:00
< title > The MPL Reference Manual: BOOST_MPL_LIMIT_METAFUNCTION_ARITY</ title >
< link rel = "stylesheet" href = "../style.css" type = "text/css" />
</ head >
< body class = "docframe refmanual" >
2010-08-09 20:07:24 +00:00
< table class = "header" >< tr class = "header" >< td class = "header-group navigation-bar" >< span class = "navigation-group" >< a href = "./cfg-no-has-xxx-template.html" class = "navigation-link" > Prev</ a > < a href = "./limit-vector-size.html" class = "navigation-link" > Next</ a ></ span >< span class = "navigation-group-separator" > | </ span >< span class = "navigation-group" >< a href = "./cfg-no-has-xxx-template.html" class = "navigation-link" > Back</ a > < a href = "./limit-vector-size.html" class = "navigation-link" > Along</ a ></ span >< span class = "navigation-group-separator" > | </ span >< span class = "navigation-group" >< a href = "./configuration.html" class = "navigation-link" > Up</ a > < a href = "../refmanual.html" class = "navigation-link" > Home</ a ></ span >< span class = "navigation-group-separator" > | </ span >< span class = "navigation-group" >< a href = "./refmanual_toc.html" class = "navigation-link" > Full TOC</ a ></ span ></ td >
2004-11-28 03:35:12 +00:00
< td class = "header-group page-location" >< a href = "../refmanual.html" class = "navigation-link" > Front Page</ a > / < a href = "./macros.html" class = "navigation-link" > Macros</ a > / < a href = "./configuration.html" class = "navigation-link" > Configuration</ a > / < a href = "./limit-metafunction-arity.html" class = "navigation-link" > BOOST_MPL_LIMIT_METAFUNCTION_ARITY</ a ></ td >
</ tr ></ table >< div class = "header-separator" ></ div >
2009-08-17 11:30:52 +00:00
< div class = "section" id = "boost-mpl-limit-metafunction-arity" >
2010-08-09 20:07:24 +00:00
< h1 >< a class = "toc-backref" href = "./configuration.html#id1601" > BOOST_MPL_LIMIT_METAFUNCTION_ARITY</ a ></ h1 >
< div class = "section" id = "id1353" >
2004-11-28 03:35:12 +00:00
< h3 >< a class = "subsection-title" href = "#synopsis" name = "synopsis" > Synopsis</ a ></ h3 >
< pre class = "literal-block" >
#if !defined(< a href = "./limit-metafunction-arity.html" class = "identifier" > BOOST_MPL_LIMIT_METAFUNCTION_ARITY</ a > )
# define < a href = "./limit-metafunction-arity.html" class = "identifier" > BOOST_MPL_LIMIT_METAFUNCTION_ARITY</ a > \
< em > implementation-defined integral constant</ em > \
/**/
#endif
</ pre >
</ div >
2010-08-09 20:07:24 +00:00
< div class = "section" id = "id1354" >
2004-11-28 03:35:12 +00:00
< h3 >< a class = "subsection-title" href = "#description" name = "description" > Description</ a ></ h3 >
2009-08-17 11:30:52 +00:00
< p >< tt class = "literal" >< span class = "pre" >< a href = "./limit-metafunction-arity.html" class = "identifier" > BOOST_MPL_LIMIT_METAFUNCTION_ARITY</ a ></ span ></ tt > is an overridable configuration macro
regulating the maximum supported arity of < a class = "reference internal" href = "./metafunction.html" > metafunctions</ a > and
< a class = "reference internal" href = "./metafunction-class.html" > metafunction classes</ a > . In this implementation of the
library, < tt class = "literal" >< span class = "pre" >< a href = "./limit-metafunction-arity.html" class = "identifier" > BOOST_MPL_LIMIT_METAFUNCTION_ARITY</ a ></ span ></ tt > has a default value of 5. To
2004-11-28 03:35:12 +00:00
override the default limit, define < tt class = "literal" >< span class = "pre" >< a href = "./limit-metafunction-arity.html" class = "identifier" > BOOST_MPL_LIMIT_METAFUNCTION_ARITY</ a ></ span ></ tt > to
2009-08-17 11:30:52 +00:00
the desired maximum arity before including any library header.
2004-11-28 03:35:12 +00:00
[< em > Note:</ em > Overriding will take effect
2010-08-09 20:07:24 +00:00
< em > only</ em > if the library is configured not to use < a class = "reference internal" href = "./cfg-no-preprocessed-headers.html#boost-mpl-cfg-no-preprocessed" > preprocessed headers</ a > . See
2009-08-17 11:30:52 +00:00
< a class = "reference internal" href = "./cfg-no-preprocessed-headers.html" > BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS</ a > for more information. — < em > end note</ em > ]</ p >
2004-11-28 03:35:12 +00:00
</ div >
2010-08-09 20:07:24 +00:00
< div class = "section" id = "id1357" >
2004-11-28 03:35:12 +00:00
< h3 >< a class = "subsection-title" href = "#example" name = "example" > Example</ a ></ h3 >
< pre class = "literal-block" >
2009-08-17 11:30:52 +00:00
#define < a href = "./cfg-no-preprocessed-headers.html" class = "identifier" > BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS</ a >
2004-11-28 03:35:12 +00:00
#define < a href = "./limit-metafunction-arity.html" class = "identifier" > BOOST_MPL_LIMIT_METAFUNCTION_ARITY</ a > 2
< tt class = "literal" >< span class = "pre" > #</ span ></ tt > include < boost/mpl/< a href = "./apply.html" class = "identifier" > apply</ a > .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;
};
2009-08-17 11:30:52 +00:00
typedef < a href = "./apply.html" class = "identifier" > apply</ a > < second< < a href = "./placeholders.html" class = "identifier" > _1</ a > ,_2_> ,int,long > ::type r1;
// typedef < a href = "./apply.html" class = "identifier" > apply</ a > < third< < a href = "./placeholders.html" class = "identifier" > _1</ a > ,_2_,< a href = "./placeholders.html" class = "identifier" > _3</ a > > ,int,long,float > ::type r2; // error!
2004-11-28 03:35:12 +00:00
</ pre >
</ div >
2010-08-09 20:07:24 +00:00
< div class = "section" id = "id1358" >
2004-11-28 03:35:12 +00:00
< h3 >< a class = "subsection-title" href = "#see-also" name = "see-also" > See also</ a ></ h3 >
2009-08-17 11:30:52 +00:00
< p >< a class = "reference internal" href = "./macros.html" > Macros</ a > , < a class = "reference internal" href = "./configuration.html" > Configuration</ a > , < a class = "reference internal" href = "./cfg-no-preprocessed-headers.html" > BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS</ a ></ p >
2004-11-28 03:35:12 +00:00
<!-- Macros/Configuration//BOOST_MPL_LIMIT_VECTOR_SIZE |30 -->
</ div >
</ div >
< div class = "footer-separator" ></ div >
2010-08-09 20:07:24 +00:00
< table class = "footer" >< tr class = "footer" >< td class = "header-group navigation-bar" >< span class = "navigation-group" >< a href = "./cfg-no-has-xxx-template.html" class = "navigation-link" > Prev</ a > < a href = "./limit-vector-size.html" class = "navigation-link" > Next</ a ></ span >< span class = "navigation-group-separator" > | </ span >< span class = "navigation-group" >< a href = "./cfg-no-has-xxx-template.html" class = "navigation-link" > Back</ a > < a href = "./limit-vector-size.html" class = "navigation-link" > Along</ a ></ span >< span class = "navigation-group-separator" > | </ span >< span class = "navigation-group" >< a href = "./configuration.html" class = "navigation-link" > Up</ a > < a href = "../refmanual.html" class = "navigation-link" > Home</ a ></ span >< span class = "navigation-group-separator" > | </ span >< span class = "navigation-group" >< a href = "./refmanual_toc.html" class = "navigation-link" > Full TOC</ a ></ span ></ td >
2009-08-17 11:30:52 +00:00
< td >< div class = "copyright-footer" >< div class = "copyright" > Copyright © 2001-2009 Aleksey Gurtovoy and David Abrahams</ div >
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at < a class = "reference external" href = "http://www.boost.org/LICENSE_1_0.txt" target = "_top" > http://www.boost.org/LICENSE_1_0.txt</ a > )</ div ></ td ></ tr ></ table ></ body >
2004-11-28 03:35:12 +00:00
</ html >