Is there a way to automatically create one method per variadic template argument?
For example, in the code below, I want to be forced to override void x(a &v)
and void x(b &v)
in class i
:
#include <type_traits>
#include <stdlib.h>
#include <stdio.h>
class a {
};
class b {
};
template <typename ...T>
class t {
public:
virtual void x(T &v) = 0;
};
class i : public t<a, b>
{
};
int
main (int argc, char *argv[])
{
i ii;
return 0;
}