I have a variadic template member function defined as:
template<typename ... Params>
VAlgorithm* CreateAlgorithm(const char *objectName, const char *className, Params ... par)
and I would like to take the address of the specialized version where Params contains no type (which I call the "empty" specialization), ie., of:
VAlgorithm* CreateAlgorithm(const char *objectName, const char *className)
I tried in several ways. The naive way:
&AlgorithmFactory::CreateAlgorithm<>
(since, for example, &AlgorithmFactory::CreateAlgorithm< int > works) and a more explicit way:
(VAlgorithm* (*)(const char*, const char*))AlgorithmFactory::CreateAlgorithm<>
With the explicit way, GCC 4.7.1 says:
error: insufficient contextual information to determine type
It seems that the "empty" specialization is not understood by the compiler, which interprets the missing template types as a lack of info and not as "no types" information. What is the correct way to do this? (Sorry for the potentially naive question but I'm fairly new to variadic templates and I found no documentation on this topic). Thanks
AlgorithmFactoryand the context where you're taking the address? - ecatmurCreateAlgorithmstatic, right? - ecatmurstaticmember function is not a member function). - ecatmur