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_AUX_LAMBDA_SUPPORT< / title >
< link rel = "stylesheet" href = "../style.css" type = "text/css" / >
< / head >
< body class = "docframe refmanual" >
2009-08-17 11:30:52 +00:00
< table class = "header" > < tr class = "header" > < td class = "header-group navigation-bar" > < span class = "navigation-group" > < a href = "./broken-compiler-workarounds.html" class = "navigation-link" > Prev< / a > < a href = "./terminology.html" class = "navigation-link" > Next< / a > < / span > < span class = "navigation-group-separator" > | < / span > < span class = "navigation-group" > Back Along< / span > < span class = "navigation-group-separator" > | < / span > < span class = "navigation-group" > < a href = "./broken-compiler-workarounds.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 >
< 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 = "./broken-compiler-workarounds.html" class = "navigation-link" > Broken Compiler Workarounds< / a > / < a href = "./aux-lambda-support.html" class = "navigation-link" > BOOST_MPL_AUX_LAMBDA_SUPPORT< / a > < / td >
2004-11-28 03:35:12 +00:00
< / tr > < / table > < div class = "header-separator" > < / div >
2009-08-17 11:30:52 +00:00
< div class = "section" id = "boost-mpl-aux-lambda-support" >
2010-08-09 20:07:24 +00:00
< h1 > < a class = "toc-backref" href = "./broken-compiler-workarounds.html#id1609" > BOOST_MPL_AUX_LAMBDA_SUPPORT< / a > < / h1 >
< div class = "section" id = "id1384" >
2004-11-28 03:35:12 +00:00
< h3 > < a class = "subsection-title" href = "#synopsis" name = "synopsis" > Synopsis< / a > < / h3 >
< pre class = "literal-block" >
#define < a href = "./aux-lambda-support.html" class = "identifier" > BOOST_MPL_AUX_LAMBDA_SUPPORT< / a > (arity, fun, params) \
< em > unspecified token sequence< / em > \
/**/
< / pre >
< / div >
2010-08-09 20:07:24 +00:00
< div class = "section" id = "id1385" >
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 > Enables metafunction < tt class = "literal" > < span class = "pre" > fun< / span > < / tt > for the use in < a class = "reference internal" href = "./lambda-expression.html" > Lambda Expression< / a > s on
compilers that don't support partial template specialization or/and
2004-11-28 03:35:12 +00:00
template template parameters. Expands to nothing on conforming compilers.< / p >
< / div >
2010-08-09 20:07:24 +00:00
< div class = "section" id = "id1386" >
2004-11-28 03:35:12 +00:00
< h3 > < a class = "subsection-title" href = "#header" name = "header" > Header< / a > < / h3 >
< pre class = "literal-block" >
#include < < a href = "../../../../boost/mpl/aux_/lambda_support.hpp" class = "header" > boost/mpl/aux_/lambda_support.hpp< / a > >
< / pre >
< / div >
2010-08-09 20:07:24 +00:00
< div class = "section" id = "id1387" >
2004-11-28 03:35:12 +00:00
< h3 > < a class = "subsection-title" href = "#parameters" name = "parameters" > Parameters< / a > < / h3 >
2009-08-17 11:30:52 +00:00
< table border = "1" class = "docutils table" >
2004-11-28 03:35:12 +00:00
< colgroup >
< col width = "15%" / >
< col width = "32%" / >
< col width = "53%" / >
< / colgroup >
< thead valign = "bottom" >
2009-08-17 11:30:52 +00:00
< tr > < th class = "head" > Parameter< / th >
< th class = "head" > Requirement< / th >
< th class = "head" > Description< / th >
2004-11-28 03:35:12 +00:00
< / tr >
< / thead >
< tbody valign = "top" >
< tr > < td > < tt class = "literal" > < span class = "pre" > arity< / span > < / tt > < / td >
< td > An integral constant< / td >
< td > The metafunction's arity, i.e. the number of its
template parameters, including the defaults.< / td >
< / tr >
< tr > < td > < tt class = "literal" > < span class = "pre" > fun< / span > < / tt > < / td >
< td > A legal identifier token< / td >
< td > The metafunction's name.< / td >
< / tr >
< tr > < td > < tt class = "literal" > < span class = "pre" > params< / span > < / tt > < / td >
2009-08-17 11:30:52 +00:00
< td > A < a class = "reference external" href = "http://www.boost.org/libs/preprocessor/doc/data/tuples.html" target = "_top" > PP-tuple< / a > < / td >
2004-11-28 03:35:12 +00:00
< td > A tuple of the metafunction's parameter names, in
their original order, including the defaults.< / td >
< / tr >
< / tbody >
< / table >
< / div >
2010-08-09 20:07:24 +00:00
< div class = "section" id = "id1388" >
2004-11-28 03:35:12 +00:00
< h3 > < a class = "subsection-title" href = "#expression-semantics" name = "expression-semantics" > Expression semantics< / a > < / h3 >
2009-08-17 11:30:52 +00:00
< p > For any integral constant < tt class = "literal" > < span class = "pre" > n< / span > < / tt > , a < a class = "reference internal" href = "./metafunction.html" > Metafunction< / a > < tt class = "literal" > < span class = "pre" > fun< / span > < / tt > , and arbitrary types < tt class = "literal" > < span class = "pre" > A1< / span > < / tt > ,... < tt class = "literal" > < span class = "pre" > An< / span > < / tt > :< / p >
2004-11-28 03:35:12 +00:00
< pre class = "literal-block" >
template< typename A1,< em > ...< / em > typename A< em > n< / em > > struct fun
{
// < em > ...< / em >
< a href = "./aux-lambda-support.html" class = "identifier" > BOOST_MPL_AUX_LAMBDA_SUPPORT< / a > (n, fun, (A1,< em > ...< / em > A< em > n< / em > ))
};
< / pre >
2009-08-17 11:30:52 +00:00
< table class = "docutils field-list" frame = "void" rules = "none" >
2004-11-28 03:35:12 +00:00
< col class = "field-name" / >
< col class = "field-body" / >
< tbody valign = "top" >
2009-08-17 11:30:52 +00:00
< tr class = "field" > < th class = "field-name" > Precondition:< / th > < td class = "field-body" > Appears in < tt class = "literal" > < span class = "pre" > fun< / span > < / tt > 's scope, immediately followed by the scope-closing
2004-11-28 03:35:12 +00:00
bracket (< tt class = "literal" > < span class = "pre" > }< / span > < / tt > ).< / td >
< / tr >
< tr class = "field" > < th class = "field-name" > Return type:< / th > < td class = "field-body" > None.< / td >
< / tr >
2009-08-17 11:30:52 +00:00
< tr class = "field" > < th class = "field-name" > Semantics:< / th > < td class = "field-body" > Expands to nothing and has no effect on conforming compilers. On compilers that
2004-11-28 03:35:12 +00:00
don't support partial template specialization or/and template template parameters
expands to an unspecified token sequence enabling < tt class = "literal" > < span class = "pre" > fun< / span > < / tt > to participate in
2009-08-17 11:30:52 +00:00
< a class = "reference internal" href = "./lambda-expression.html" > Lambda Expression< / a > s with the semantics described in this manual.< / td >
2004-11-28 03:35:12 +00:00
< / tr >
< / tbody >
< / table >
< / div >
2010-08-09 20:07:24 +00:00
< div class = "section" id = "id1389" >
2004-11-28 03:35:12 +00:00
< h3 > < a class = "subsection-title" href = "#example" name = "example" > Example< / a > < / h3 >
< pre class = "literal-block" >
template< typename T, typename U = int > struct f
{
typedef T type[sizeof(U)];
< a href = "./aux-lambda-support.html" class = "identifier" > BOOST_MPL_AUX_LAMBDA_SUPPORT< / a > (2, f, (T,U))
};
2009-08-17 11:30:52 +00:00
typedef < a href = "./apply.html" class = "identifier" > apply< / a > < tt class = "literal" > < span class = "pre" > 1< / span > < / tt > < f< char,< a href = "./placeholders.html" class = "identifier" > _1< / a > > ,long > ::type r;
2004-11-28 03:35:12 +00:00
< a href = "./assert.html" class = "identifier" > BOOST_MPL_ASSERT< / a > (( is_same< r, char[sizeof(long)] > ));
< / pre >
< / div >
2010-08-09 20:07:24 +00:00
< div class = "section" id = "id1390" >
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 = "./metafunctions.html" > Metafunctions< / a > , < a class = "reference internal" href = "./lambda-expression.html" > Lambda Expression< / a > < / p >
2004-11-28 03:35:12 +00:00
< / div >
< / div >
< div class = "footer-separator" > < / div >
2009-08-17 11:30:52 +00:00
< table class = "footer" > < tr class = "footer" > < td class = "header-group navigation-bar" > < span class = "navigation-group" > < a href = "./broken-compiler-workarounds.html" class = "navigation-link" > Prev< / a > < a href = "./terminology.html" class = "navigation-link" > Next< / a > < / span > < span class = "navigation-group-separator" > | < / span > < span class = "navigation-group" > Back Along< / span > < span class = "navigation-group-separator" > | < / span > < span class = "navigation-group" > < a href = "./broken-compiler-workarounds.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 >
< 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 >