No, currently local types are not allowed to enter templates (otherwise you could use boost or std :: tr1 :: function). However, you could do this OOP, where Foo inherits something (which has a virtual operator function () that your foo implemen ts), and you pass ptr instead of Foo.
source
share