Talk:cpp/io/basic istream/seekg

seekg and eofbit
This page tells that clears, but I spent a lot of time seeking for an error. Result is next: if the flag was set,  can't do anything (but  was 0) and after calling  I got -1 from. The solution was to call before  to clear  manually. I'm using gcc version 4.6.1. I don't know what standard says about this situation, but maybe this page should be corrected. --217.67.65.115 16:41, 11 March 2012 (PDT)


 * The standard seems to say that should be cleared -- section 27.7.2.3. 72.14.228.1 18:08, 11 March 2012 (PDT)


 * Sorry to resurrect a discussion, but perhaps it should be mentioned that some compilers don't clear the with  right now? I also spent a while trying to find why my stream wasn't valid after calling, before finding and using the same solution as above. I'm using MSVC 12. --Jaggedspire (talk) 08:41, 3 April 2015 (PDT)
 * Just saying that some particular compiler has a bug is going to be outdated (and not having a link to a bug report makes it hard to find out if it is outdated), If it's still an issue in the VS 2015 preview and there is a bug report, it may be helpful to link it in the Notes section (and if this wasn't reported, report it. gcc fixed this a while back). See for example std which mentions bug reports in three different compilers (although that example isn't best because bug reports are mentioned inline in an example, Notes is the better section). --Cubbi (talk) 11:41, 3 April 2015 (PDT)
 * It turns out I was mistaken regarding the setting of . It only seemed like I was experiencing issues with failing to clear the : it does  clear the, as it is supposed to. I wasn't taking into account the possibility of the  setting the , which naturally prevents  from fetching the next line from the stream, regardless of position. Thank you for your input on the matter,  as you clarified matters for me, and it was when I was attempting to put together an example for the bug report that I realized my mistake. --Jaggedspire (talk) 13:04, 3 April 2015 (PDT)