Boost logo

Boost :

Subject: Re: [boost] [mpl] is_lambda_expression bug?
From: James Hirschorn (james.hirschorn_at_[hidden])
Date: 2013-02-10 01:12:55


Jeffrey Lee Hellrung, Jr.-2 wrote
> If it's not documented, I don't know what propertiesis_lambda_expression
> has and what guarantees it makes. Its name suggestssome, I admit, but who
> knows what the author's intents were? Without someadditional
> documentation, the code defines its behavior, hence I'd say
> it'stautologically correct :)I can sympathize if you think the above
> implies this metafunction should bean auxiliary or detail namespace; I
> would agree.

I would think (but I don't really know) that having undocumented functions
in the main namespaces would itself be a violation of boost policies, even
if it worked as expected. On this basis I think I will make a report and see
what they say.
Even if it was hidden, it seems like horrible style to have
is_lambda_expression fail on lambda expressions (there is a documented
is_sequence metafunction, and there is an is_placeholder in the mpl
namespace that seems to work as expected).

> Is this just an FYI, or are you genuinely in need to detecting
> Boost.MPLlambda expressions?

Yes, there is a need. I want a function to be instantiated according to its
template parameters (e.g. one definition if T1 is a lambda_expression and
another if T1 is a sequence (or is there overlap?)).

--
View this message in context: http://boost.2283326.n4.nabble.com/mpl-is-lambda-expression-bug-tp4642509p4642568.html
Sent from the Boost - Dev mailing list archive at Nabble.com.

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