From: David Abrahams (dave_at_[hidden])
Date: 2003-08-08 07:56:26
"David B. Held" <dheld_at_[hidden]> writes:
> It seems to me that in a policy-based design, the main class needs
> to know if the policies are metafunctions or metafunction classes.
> Now, I was under the impression, based on what Aleksey said a long
> time ago, that these are basically interchangeable through a lambda-
> based policy adaptor.
No, metafunction classes and *lambda expressions* are interchangeable
lambda<my<lambda_expr, _1, ession<_2> > >::type
is a metafunction class qeuivalent to:
template <class A1, class A2>
typedef typename my<
, typename ession<A2>::type
is a metafunction class equivalent to
Don't pass metafunctions directly; it's bad for interoperability.
Then you get a metafunction taking a template template parameter, and
you can't use it in lambda expressions.
-- Dave Abrahams Boost Consulting www.boost-consulting.com
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk