For example
template<class D, Function>
struct A
{
void foo()
{
D d;
int i = Function(d);
// Here function can be a free function: int fun(D& d)
// or member function: int D::fun()
// or function object:
}
};
How to set the template parameter to allow flexibility in choosing different kinds of functions? Code can be changed just allow the flexibility is fine. Thanks