C ++ 0x lambdas with template options?

Possible duplicate:
Can lambda patterns be built?

Is it possible to use lambda C ++ 0x with template parameters? For example:

template <typename T> [=](const T *x) {} 

What I'm trying to do is encode a static loop for a loop in the type list (list of variational arguments), and I want to pass the current type as a parameter to the operator () of the target functor (or lambda).

+5
lambda c ++ 11 templates metaprogramming
Nov 08 2018-10-10
source share
1 answer

What is called polymorphic lambda, I already asked about it there: Can lambda templates be built?

And no, this is not possible in C ++ 0x. Perhaps the next one.

However boost :: phoenix allows this to be done in a possibly good way.

+1
Nov 08 '10 at 14:12
source share
— -



All Articles