One cannot have a virtual template method in C++. I want to have an interface and some classes which implement it. For example:
class Logger {
public:
template<typename... Args>
virtual void Error(const std::string& message, Args... args) const = 0;
};
class ConsoleLogger : public Logger {
public:
template<typename... Args>
void Error(const std::string& message, Args... args) const{}
};
Is there any work-around? I still want to use the interface.