fork download
  1. #include<iostream>
  2.  
  3. template<typename Iterator>
  4. struct foo
  5. {
  6. public:
  7. typedef typename Iterator::value_type value_type;
  8. };
  9.  
  10.  
  11. class MyIterator
  12. {
  13. public:
  14. typedef MyIterator value_type;
  15. typedef MyIterator* pointer;
  16. };
  17.  
  18. int main()
  19. {
  20. // foo<MyIterator> f;
  21. MyIterator it = foo<MyIterator>::value_type;
  22. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cpp: In function 'int main()':
prog.cpp:21:47: error: expected primary-expression before ';' token
stdout
Standard output is empty