D
dj
I somehow understand why member function templates cannot be virtual,
but my question is how I could achieve something similar to this:
class A {
public:
template<typename T> virtual f() = 0;
}
class B : public A {
public:
template<typename T> f();
}
class C : public A {
public:
template<typename T> f();
}
That is, I would like to force subclasses to implement a templated
member function f.
but my question is how I could achieve something similar to this:
class A {
public:
template<typename T> virtual f() = 0;
}
class B : public A {
public:
template<typename T> f();
}
class C : public A {
public:
template<typename T> f();
}
That is, I would like to force subclasses to implement a templated
member function f.