fork(2) download
  1. #include <list>
  2. #include <stdio.h>
  3.  
  4. int main()
  5. {
  6. std::list<int> mylist;
  7. mylist.push_back(1);
  8. std::list<int>::iterator i = mylist.end();
  9. if( i == mylist.end() )
  10. printf( "end is end\n" );
  11.  
  12. mylist.clear();
  13. if( i == mylist.end() )
  14. printf( "never get here because Microsoft seems to think the iterator is no longer safe.\n" );
  15.  
  16. return 0;
  17. }
  18.  
Success #stdin #stdout 0s 3028KB
stdin
Standard input is empty
stdout
end is end
never get here because Microsoft seems to think the iterator is no longer safe.