Can lambda expressions be used as class template parameters? (Note this is a very different question than this one, which asks if a lambda expression itself can be
You can't do this with a closure, because the state is not contained in the type.
If your lambda is stateless (no captures), then you should be ok. In this case the lambda decays to an ordinary function pointer, which you can use as a template argument instead of some lambda type.
gcc doesn't like it though. http://ideone.com/bHM3n