Reputation: 3
I would like to override an interface method which contains an ellipsis with a template method. I wonder if this is possible.
Imagine following:
class MyInterface
{
public:
virtual void myMethod(int i, const char* fmt, ...) = 0;
};
class MyMock: public MyInterface
{
template< typename ...Args >
void myMethod(int i, const char* fmt, Args&&... args) override
{
//use ellipsis expressions here
}
};
When I do this I get the following error:
C++ function modifier (override) does not apply to member template declaration
Upvotes: 0
Views: 65