fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. class B;
  5.  
  6. template<typename T>
  7. class A
  8. {
  9. private:
  10.  
  11. A()
  12. {
  13. T b;
  14. b.print();
  15. }
  16.  
  17. void print()
  18. {
  19.  
  20. }
  21.  
  22.  
  23. };
  24.  
  25. class B: public A<B>
  26. {
  27.  
  28. };
  29.  
  30. int main() {
  31. // your code goes here
  32.  
  33. return 0;
  34. }
Success #stdin #stdout 0s 3336KB
stdin
Standard input is empty
stdout
Standard output is empty