I'm far from being a guru, specially when it comes to templates, but anyway that looks like a callback definition that would be a way of calling different function methods in torrent:ownload objects. Suppose you have a simple Download class in a namespace torrent for instance:
Code:
namespace torrent
{
class Download
{
public:
float fn1();
float fn2();
int otherfn();
someclass somefn();
}; //class Download
}; //namespace torrent
Code:
template <typename Ret, Ret (torrent::Download::*func)()> void call()
{
(m_download.*func)();
}
Now i believe that the code you posted is a templated function inside a class, i believe that 'm_download' object in there to be a class member since it is not an argument to the function being declared. By putting this into a template you are allowing the simple function to call methods in the object without having the need for a set of different calls (one for every possible return type), thus allowing you to use the same simple syntax to call functions returning int, float or even class types. Taking the example i gave you before:
Code:
//Declare a function pointer to point to otherfn() method
int (torrent::Download::*fn_ptr)() = &torrent::Download::otherfn;
//Declare a function pointer to the fn1() member method
float (torrent::Download::*fn_ptr2)() = &torrent::Download::fn1;
/* if A is an object from the class where the template call is declared
it contains a torrent::Download object which is m_download */
A.call<int,fn_ptr>(); // will call m_download.otherfn() which returns an int
A.call<float,fn_ptr2>(); // will call m_download.fn1() which will return a float
Of course these are just some ideas as from such a tiny small snippet of code it's quite hard to guess exactly how and when it is being used.
Sorry for the huge post, i hope this helps a tad. Cheers