fork download
  1. struct foo {
  2. virtual int bleh() {
  3. return 42;
  4. }
  5. };
  6.  
  7.  
  8. template<typename T>
  9. struct bar : public foo {
  10.  
  11. };
  12.  
  13. template<>
  14. int bar<char>::bleh() {
  15. return 12;
  16. }
  17.  
  18. int main() {
  19. bar<char> x;
  20. return x.bleh();
  21. }
  22.  
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cpp:14:21: error: no member function ‘bleh’ declared in ‘bar<char>’
stdout
Standard output is empty