Hello! Does someone know a way to achieve or emulate the following behaviour? (this code results in compilation-time error).
E.g, I want to add specific template specialization only in derived classes.
struct Base {
template <typename T> void Method(T a) {
T b;
}
template <> void Method<int>(int a) {
float c;
}
};
struct Derived : public Base {
template <> void Method<float>(float a) {
float x;
}
};