Boost logo

Boost :

From: Jonathan Turkanis (technews_at_[hidden])
Date: 2004-09-14 09:39:53

"David Abrahams" <dave_at_[hidden]> wrote in message
> "Jonathan Turkanis" <technews_at_[hidden]> writes:
> > "Jonathan Turkanis" <technews_at_[hidden]> wrote in message
> > news:ci5qf6$ioc$
> >
> >> The library is here:
> >
> > That's the link for the docs. The download page is here:
> >
> Surely this functionality already exists somewhere in the MPL? Yup,
> there's is_lambda_expression<E>::value (which is true iff
> is_placeholder_expression<E>::value | is_metafunction_class<E>::value).

I wrote this last winter. is_lambda_expression seems to be a recent (very
welcome) addition.

When I searched throught the mpl source for is_lambda_expression,
is_metafunction_class, is_metafunction, etc. all I found was the nested type
is_le. I tried to define is_lambda_expression like this

    template<typename T>
    struct is_lambda_expression {
        typedef typename lambda<T>::is_le type;
        static const bool value = type::value;

and it almost worked, but failed for some metafunctions, including always<int>.

Anyway, I'm glad to see it's there now.

Perhaps the macro BOOST_HAS_TEMPLATE_XXX_TRAIT_NAMED_DEF would still be useful?


Boost list run by bdawes at, gregod at, cpdaniel at, john at