0
是否有一種方法可以在派生類中重載基類模板類函數,並且仍然可以調用基類函數,如下所述?C++如何在派生類中從派生類中調用重載的模板類函數?
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();
}