fork(1) download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. template<class Cont, class Iter=typename Cont::iterator>
  5. class my_iterator: public std::iterator_traits<Iter> {
  6. Iter it;
  7.  
  8. public:
  9. reference operator*() const {return *it;} // error
  10. };
  11.  
  12. int main() {
  13. // your code goes here
  14. return 0;
  15. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cpp:9:2: error: 'reference' does not name a type
  reference operator*() const {return *it;} // error
  ^
stdout
Standard output is empty