I will try to explain my problem with a simple example:
class UselessClass {};
template<class RUNNABLE>
class Task : public RUNNABLE
{
public:
static void StartScheduler()
{
//Start system scheduler
}
};
main.cpp
Task<UselessClass>::StartScheduler(); //Correct
//Task::StartScheduler(); //Wrong
What I want to do is write the following code: Task::StartScheduler();
You can't. Template is not a class, you can't call it without providing template parameters so that the compiler would know the exact type to call methods from.
When you try using
Task::StartScheduler();, the compiler has no way to know what is the type of theRUNNABLEtemplate parameter.You can do something like this:
Though it is not exactly what you wanted,