fork(1) download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. template <typename T>
  5. struct B {
  6. typedef T type;
  7. };
  8.  
  9. struct D0 : public B<int> {
  10. void h(type) { }
  11. };
  12.  
  13. template <typename T>
  14. struct D : public B<T> {
  15. void f(typename B<T>::type) { }
  16. void g(type) { }
  17. };
  18.  
  19.  
  20. int main() {
  21. }
Compilation error #stdin compilation error #stdout 0s 3456KB
stdin
Standard input is empty
compilation info
prog.cpp:16:9: error: 'type' has not been declared
  void g(type) { }
         ^
stdout
Standard output is empty