fork download
  1. template<typename A>
  2. class Base {};
  3.  
  4. template<typename A, typename B>
  5. class Derived : public Base<A> {
  6. public:
  7. void doSomething() {}
  8. };
  9.  
  10. int main() {
  11. Base<int>* foo = new Derived<int, double>;
  12. static_cast<Derived<int, double>*>(foo)->doSomething();
  13. return 0;
  14. }
Success #stdin #stdout 0s 3424KB
stdin
Standard input is empty
stdout
Standard output is empty