|
Boost : |
From: Jonathan Turkanis (technews_at_[hidden])
Date: 2004-09-14 09:39:53
"David Abrahams" <dave_at_[hidden]> wrote in message
news:upt4pvvfy.fsf_at_boost-consulting.com...
> "Jonathan Turkanis" <technews_at_[hidden]> writes:
>
> > "Jonathan Turkanis" <technews_at_[hidden]> wrote in message
> > news:ci5qf6$ioc$1_at_sea.gmane.org...
> >
> >> The library is here: http://tinyurl.com/43ddj.
> >
> > That's the link for the docs. The download page is here:
> > http://tinyurl.com/4axzk.
>
> 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?
Jonathan
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk