Boost logo

Boost :

Subject: Re: [boost] [mpl] is_lambda_expression bug?
From: Nathan Crookston (nathan.crookston_at_[hidden])
Date: 2013-02-08 18:19:27


Hi James,

James Hirschorn wrote:

> The compile-time assertion fails in the following program. I have tried
> with
> more than one version of boost including 1.53.
>
> Is it a bug? Shall I report it?
>
>
I agree with Jeff, that this isn't really part of the public interface -- I
can't find docs either.

The metafunction itself appears to detect placeholder expressions*: i.e.,
expressions involving arg<N> or mpl::bind<>, which it obviously wouldn't in
your code. The following lines work:

BOOST_MPL_ASSERT_NOT((mpl::is_lambda_expression<MetafunctionClass>));
BOOST_MPL_ASSERT((mpl::is_lambda_expression<mpl::plus<mpl::_1,mpl::_2> >));

Though it would be unwise to depend on it.

HTH,
Nate

*
http://www.boost.org/doc/libs/1_53_0/libs/mpl/doc/refmanual/placeholder-expression.html


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk