fork download
  1. template<typename T>
  2. class Base {
  3. protected:
  4. T t;
  5. };
  6.  
  7. template<typename T>
  8. class Derived: public Base<T> {
  9. public:
  10. T get() { return t; }
  11. };
  12.  
  13. int main() {
  14. Derived<int> d;
  15. d.get();
  16. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cpp: In member function 'T Derived<T>::get()':
prog.cpp:10:22: error: 't' was not declared in this scope
stdout
Standard output is empty