fork download
  1. template< typename P >
  2. class A
  3. {
  4. private:
  5.  
  6. typedef A< P > TSelf;
  7.  
  8.  
  9. public:
  10. P m;
  11. A( P f ) : m( f ){}
  12. };
  13.  
  14. class B : public A< int >
  15. {
  16. private:
  17. typedef A< int > TBase;
  18. public:
  19. B( int f ) : TBase( f ){}
  20. };
  21.  
  22. int main( void )
  23. {
  24. B lb;
  25. return ( 0 );
  26. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cpp: In function 'int main()':
prog.cpp:24:4: error: no matching function for call to 'B::B()'
prog.cpp:19:3: note: candidates are: B::B(int)
prog.cpp:15:1: note:                 B::B(const B&)
stdout
Standard output is empty