Back to Arangodb

BOOST_MPL_AUX_LAMBDA_SUPPORT

3rdParty/boost/1.78.0/libs/mpl/doc/refmanual/aux-lambda-support.html

3.12.9.13.1 KB
Original Source

| Prev Next | Back Along | Up Home | Full TOC | Front Page / Macros / Broken Compiler Workarounds / BOOST_MPL_AUX_LAMBDA_SUPPORT |

BOOST_MPL_AUX_LAMBDA_SUPPORT

Synopsis

#define[BOOST\_MPL\_AUX\_LAMBDA\_SUPPORT](./aux-lambda-support.html)(arity, fun, params) \_unspecified token sequence_\
/**/

Description

Enables metafunction fun for the use in Lambda Expressions on compilers that don't support partial template specialization or/and template template parameters. Expands to nothing on conforming compilers.

#include <[boost/mpl/aux\_/lambda\_support.hpp](../../../../boost/mpl/aux_/lambda_support.hpp)>

Parameters

ParameterRequirementDescription
arityAn integral constantThe metafunction's arity, i.e. the number of its template parameters, including the defaults.
funA legal identifier tokenThe metafunction's name.
paramsA PP-tupleA tuple of the metafunction's parameter names, in their original order, including the defaults.

Expression semantics

For any integral constant n, a Metafunction fun, and arbitrary types A1,... An:

template< typename A1,_..._typename A_n_> struct fun
{
    //_..._[BOOST\_MPL\_AUX\_LAMBDA\_SUPPORT](./aux-lambda-support.html)(n, fun, (A1,_..._A_n_))
};

| Precondition: | Appears in fun's scope, immediately followed by the scope-closing bracket (}). | | Return type: | None. | | Semantics: | Expands to nothing and has no effect on conforming compilers. On compilers that don't support partial template specialization or/and template template parameters expands to an unspecified token sequence enabling fun to participate in Lambda Expressions with the semantics described in this manual. |

Example

template< typename T, typename U = int > struct f
{
    typedef T type[sizeof(U)];[BOOST\_MPL\_AUX\_LAMBDA\_SUPPORT](./aux-lambda-support.html)(2, f, (T,U))
};

typedef[apply](./apply.html)1< f<char,[\_1](./placeholders.html)>,long >::type r;[BOOST\_MPL\_ASSERT](./assert.html)(( is_same< r, char[sizeof(long)] > ));

See also

Macros, Metafunctions, Lambda Expression

| 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) |