fork(4) download
  1. #include <iostream>
  2. #include <string>
  3. #include <vector>
  4. #include <array>
  5.  
  6.  
  7. template<typename T>
  8. class CListDeleter
  9. {
  10. public:
  11. static void Delete(T const&) {zzz;}
  12. };
  13.  
  14. template<typename T>
  15. class CListDeleter<T*>
  16. {
  17. public:
  18. static void Delete(T* ptr)
  19. {
  20. delete ptr;
  21. }
  22. };
  23.  
  24. int main()
  25. {
  26. int* foo;
  27. CListDeleter<int*>::Delete(foo);
  28. }
  29.  
Compilation error #stdin compilation error #stdout 0s 3292KB
stdin
Standard input is empty
compilation info
prog.cpp: In static member function ‘static void CListDeleter<T>::Delete(const T&)’:
prog.cpp:11:34: error: ‘zzz’ was not declared in this scope
    static void Delete(T const&) {zzz;}
                                  ^
stdout
Standard output is empty