Building a lambda expression which applies a metafiction twice...

Hi,

I am stuck. I have this metafunction twice:


1
2
3
4
template<class F, class X>
    struct twice
    :   mpl::apply<F, typename mpl::apply<F,X>::type>
    {};


and I need to express this as a lambda expression for an exercise I am working on... I was thinking maybe this could work:

typedef typename mpl::apply<_1, typename mpl::apply<_1,_2>::type>::type twice_lambda_expression;

but I don't think that is a lambda expression even though it has placeholder expressions..

Any ideas?

Thanks
Juan
closed account (48bpfSEw)
lamba expressions looks a bit differnt:

http://en.cppreference.com/w/cpp/language/lambda

Last edited on
OP is playing with libmpich?
You should ask on a mpich forum.
We don't know.
I am afraid the meaning of lambda expression is taken differently here than in boost's context so I will address it there.

I am sorry, it is not my intention to fill questions and then appear not to read the answers - but I am reading them, they are just not in the correct context.

Regards,
Juan
Topic archived. No new replies allowed.