"David B. Held" <[EMAIL PROTECTED]> 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
through lambda.
lambda<my<lambda_expr, _1, ession<_2> > >::type
is a metafunction class qeuivalent to:
struct
{
template <class A1, class A2>
struct apply
{
typedef typename my<
lambda_expr
, A1
, typename ession<A2>::type
>::type type;
};
};
and
lambda<some_metafunction_class>::type
is a metafunction class equivalent to
some_metafunction_class.
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.
HTH,
--
Dave Abrahams
Boost Consulting
www.boost-consulting.com
_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost