fork download
  1. template<typename T>
  2. struct MyTempl
  3. {
  4. virtual void doStuff(const T &value) = 0;
  5. };
  6.  
  7. struct MyImpl : MyTempl<int>
  8. {
  9. void doStuff(const int &value) {}
  10. };
  11.  
  12. struct MyPtrImpl : MyTempl<int*>
  13. {
  14. typedef int *T;
  15. void doStuff(const T & foo) {}
  16. };
  17.  
  18. MyImpl imp1;
  19. MyPtrImpl imp2;
  20.  
  21.  
  22.  
  23. int main() {
  24. }
Success #stdin #stdout 0s 3292KB
stdin
Standard input is empty
stdout
Standard output is empty