BOOST_MPL_AUX_LAMBDA_SUPPORT
#define BOOST_MPL_AUX_LAMBDA_SUPPORT(arity, fun, params) \
unspecified token sequence \
/**/
Broken compiler workaround macro, 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"
| Parameter | Description |
|---|---|
arity | The metafunction's arity, i.e. the number of its template parameters, including the defaults. |
fun | The metafunction's name. |
params | PP-tuple of the metafunction's parameter names, in their original order. |
template< typename T, typename U = int > struct f
{
typedef T type[sizeof(U)];
BOOST_MPL_AUX_LAMBDA_SUPPORT(2,f,(T,U))
};
typedef lambda< f<char,_1> >::type f_; // use f in a lambda expression
typedef apply1<f_,long>::type res;
BOOST_MPL_ASSERT_IS_SAME(res, char[sizeof(long)]);