有没有办法在派生类中重载基模板类函数,并且仍然能够调用基类函数,如下所述?
template <class A>
class testBase {
public:
void insert() {
// Whatever
}
};
class testDerived : public testBase<double> {
private:
void insert(int a) {
// something
}
};
int main() {
testDerived B;
// Compiler doesn't recognize overloaded insert,
// How do you do this?
B.insert();
}