Opened 10 years ago

#8148 new Bugs

mpl::is_lambda_expression bug

Reported by: James Hirschorn <James.Hirschorn@…> Owned by: Aleksey Gurtovoy
Milestone: To Be Determined Component: mpl
Version: Boost 1.53.0 Severity: Problem
Keywords: is_lambda_expression Cc: eldiener@…, jeffrey.hellrung@…, nathan.crookston@…

Description

The metafunction boost::mpl::is_lambda_expression does not work correctly.

My attached code example give a metafunction class for which is_lambda_expression evaluates as false.

While is_lambda_expression is not a documented feature of boost::mpl, it is available in the boost::mpl namespace. Moreover, it is used in the implementation of boost::mpl::transform, and presumably results in unintended behaviour there.

The package boost::tti (in the boost/trunk) has boost::tti::detail::is_lambda_expression. I have confirmed that this works correctly on my example (see attached file). The tti author has informed me that tti depends on mpl. Perhaps then, boost::mpl::is_lambda_expression should be replaced by tti's.

Attachments (1)

is_lambda_expression_counterexample.cpp (835 bytes ) - added by James Hirschorn <James.Hirschorn@…> 10 years ago.

Download all attachments as: .zip

Change History (1)

by James Hirschorn <James.Hirschorn@…>, 10 years ago

Note: See TracTickets for help on using tickets.