I have a template that accepts a function as an argument.
When I try to pass a lambda expression it does not compile.
typedef int (*func)(int a); te
This is only because "You cannot use the name or address of a local variable as a template argument.". If you want to make a global static lambda, go refer to http://pfultz2.com/blog/2014/09/02/static-lambda/ you may find what you want.