Is it not valid to pass a function to a class template as described above?
. , , , , ++. , fun , void (*)(). , . .
, . , , :
Declare obj(&fun);
, , , . , , : , , AbstractFunctor (, ) , template<Fun fun> struct Functor. Functor, , AbstractFunctor* Declare.
, Declare::Type Declare::AbstractFunctor::Type, , ; . , A::Type . , instance.Type. , , : , , .
EDIT:
++ 0x ( ), :
Declare<decltype(&fun)>::Type pf = &fun;
pf(); //call the function
: http://ideone.com/
Declare, :
decltype(&fun) pf = &fun;
pf();